pub struct LabelContext<'a> {
pub sidecar: &'a SidecarV1,
pub stack: Option<&'a StackDocV1>,
pub album: Option<&'a AlbumDocV1>,
}Expand description
Everything a tags_user term can see for one asset: its sidecar plus the records of the
stack and container album it belongs to, where the caller holds them.
Fields§
§sidecar: &'a SidecarV1The asset’s sidecar.
stack: Option<&'a StackDocV1>The stack record for the stack the asset belongs to. Ignored unless the sidecar’s
current stack_membership names this record’s stack_id.
album: Option<&'a AlbumDocV1>The record of the asset’s container album.
Implementations§
Source§impl LabelContext<'_>
impl LabelContext<'_>
Sourcepub fn level_of(&self, label: &str) -> Option<LabelLevel>
pub fn level_of(&self, label: &str) -> Option<LabelLevel>
The first level, in LabelLevel order, at which label is attached to the asset, or
None when no level carries it.
Whether a tags_user contains term with operand label matches this asset.
Trait Implementations§
Source§impl<'a> Clone for LabelContext<'a>
impl<'a> Clone for LabelContext<'a>
Source§fn clone(&self) -> LabelContext<'a>
fn clone(&self) -> LabelContext<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for LabelContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for LabelContext<'a>
impl<'a> RefUnwindSafe for LabelContext<'a>
impl<'a> Send for LabelContext<'a>
impl<'a> Sync for LabelContext<'a>
impl<'a> Unpin for LabelContext<'a>
impl<'a> UnsafeUnpin for LabelContext<'a>
impl<'a> UnwindSafe for LabelContext<'a>
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
Mutably borrows from an owned value. Read more
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<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>
Converts
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>
Converts
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