pub struct DefaultAlbumContext {
pub explicit_pick: Option<Uuid>,
pub owner_default_album_id: Option<Uuid>,
pub derived_de_facto_album_id: Option<Uuid>,
pub scope: Option<Scope>,
}Expand description
Everything the resolution order reads. Each field is one rule’s input, in priority
order; scope is carried for traceability and for the
post-v1 override rows.
A context whose three album fields are all None is unbound — no library has been
attached to it yet. That is a caller-side gap, not a user-facing state: an owner always
has a derived de facto album, so binding it (see
with_derived) makes resolution total.
Fields§
§explicit_pick: Option<Uuid>Rule 1 — the album the user picked explicitly for this import, if any.
owner_default_album_id: Option<Uuid>Rule 2 — the owner record’s default_album_id pointer, if known to this device.
derived_de_facto_album_id: Option<Uuid>Rule 3 — the de facto album derived from the account master key. Only the library
knows it, so callers bind it with with_derived.
scope: Option<Scope>The import source this run came from. Not read by the v1 order; recorded on the resolution, and the seam the post-v1 override rows key off.
Implementations§
Source§impl DefaultAlbumContext
impl DefaultAlbumContext
Sourcepub fn derived(derived_de_facto_album_id: Uuid) -> Self
pub fn derived(derived_de_facto_album_id: Uuid) -> Self
A context bound to a library’s derived de facto album (rule 3) and nothing else — the “user filed it nowhere, no owner pointer known” baseline.
Sourcepub fn with_derived(&self, derived: Uuid) -> Self
pub fn with_derived(&self, derived: Uuid) -> Self
This context with rule 3 bound to derived if it is not already set.
The library is the only authority on the derived de facto album, so a caller that
assembled the context without one (an ImportConfig (capsule-library’s import planner) built
before a workspace was opened) completes it here. An already-bound context is
returned unchanged, so binding twice cannot change the answer.
Trait Implementations§
Source§impl Clone for DefaultAlbumContext
impl Clone for DefaultAlbumContext
Source§fn clone(&self) -> DefaultAlbumContext
fn clone(&self) -> DefaultAlbumContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DefaultAlbumContext
impl Debug for DefaultAlbumContext
Source§impl Default for DefaultAlbumContext
impl Default for DefaultAlbumContext
Source§fn default() -> DefaultAlbumContext
fn default() -> DefaultAlbumContext
impl Eq for DefaultAlbumContext
Source§impl PartialEq for DefaultAlbumContext
impl PartialEq for DefaultAlbumContext
Source§fn eq(&self, other: &DefaultAlbumContext) -> bool
fn eq(&self, other: &DefaultAlbumContext) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DefaultAlbumContext
Auto Trait Implementations§
impl Freeze for DefaultAlbumContext
impl RefUnwindSafe for DefaultAlbumContext
impl Send for DefaultAlbumContext
impl Sync for DefaultAlbumContext
impl Unpin for DefaultAlbumContext
impl UnsafeUnpin for DefaultAlbumContext
impl UnwindSafe for DefaultAlbumContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more