pub struct MetadataBuilder<N, K, L, W, WV, A, AV, S: State = Empty>{ /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<N, K, L, W, WV, A, AV, S: State> MetadataBuilder<N, K, L, W, WV, A, AV, S>
impl<N, K, L, W, WV, A, AV, S: State> MetadataBuilder<N, K, L, W, WV, A, AV, S>
Sourcepub fn build(self) -> Metadata<N, K, L, W, WV, A, AV>where
S: IsComplete,
pub fn build(self) -> Metadata<N, K, L, W, WV, A, AV>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn id(self, value: Uuid) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetId<S>>where
S::Id: IsUnset,
pub fn id(self, value: Uuid) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetId<S>>where
S::Id: IsUnset,
Sourcepub fn maybe_id(
self,
value: Option<Uuid>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetId<S>>where
S::Id: IsUnset,
pub fn maybe_id(
self,
value: Option<Uuid>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetId<S>>where
S::Id: IsUnset,
Sourcepub fn name(
self,
value: impl Into<N>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetName<S>>where
S::Name: IsUnset,
pub fn name(
self,
value: impl Into<N>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetName<S>>where
S::Name: IsUnset,
Sourcepub fn maybe_name(
self,
value: Option<impl Into<N>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetName<S>>where
S::Name: IsUnset,
pub fn maybe_name(
self,
value: Option<impl Into<N>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetName<S>>where
S::Name: IsUnset,
Sourcepub fn kind(
self,
value: impl Into<K>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetKind<S>>where
S::Kind: IsUnset,
pub fn kind(
self,
value: impl Into<K>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetKind<S>>where
S::Kind: IsUnset,
Sourcepub fn maybe_kind(
self,
value: Option<impl Into<K>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetKind<S>>where
S::Kind: IsUnset,
pub fn maybe_kind(
self,
value: Option<impl Into<K>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetKind<S>>where
S::Kind: IsUnset,
Sourcepub fn labels(
self,
value: BTreeSet<L>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetLabels<S>>where
S::Labels: IsUnset,
pub fn labels(
self,
value: BTreeSet<L>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetLabels<S>>where
S::Labels: IsUnset,
Sourcepub fn maybe_labels(
self,
value: Option<BTreeSet<L>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetLabels<S>>where
S::Labels: IsUnset,
pub fn maybe_labels(
self,
value: Option<BTreeSet<L>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetLabels<S>>where
S::Labels: IsUnset,
Sourcepub fn weights(
self,
value: BTreeMap<W, WV>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetWeights<S>>where
S::Weights: IsUnset,
pub fn weights(
self,
value: BTreeMap<W, WV>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetWeights<S>>where
S::Weights: IsUnset,
Sourcepub fn maybe_weights(
self,
value: Option<BTreeMap<W, WV>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetWeights<S>>where
S::Weights: IsUnset,
pub fn maybe_weights(
self,
value: Option<BTreeMap<W, WV>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetWeights<S>>where
S::Weights: IsUnset,
Sourcepub fn annotations(
self,
value: BTreeMap<A, AV>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetAnnotations<S>>where
S::Annotations: IsUnset,
pub fn annotations(
self,
value: BTreeMap<A, AV>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetAnnotations<S>>where
S::Annotations: IsUnset,
Sourcepub fn maybe_annotations(
self,
value: Option<BTreeMap<A, AV>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetAnnotations<S>>where
S::Annotations: IsUnset,
pub fn maybe_annotations(
self,
value: Option<BTreeMap<A, AV>>,
) -> MetadataBuilder<N, K, L, W, WV, A, AV, SetAnnotations<S>>where
S::Annotations: IsUnset,
Auto Trait Implementations§
impl<N, K, L, W, WV, A, AV, S> Freeze for MetadataBuilder<N, K, L, W, WV, A, AV, S>
impl<N, K, L, W, WV, A, AV, S> RefUnwindSafe for MetadataBuilder<N, K, L, W, WV, A, AV, S>where
N: RefUnwindSafe,
K: RefUnwindSafe,
W: RefUnwindSafe,
WV: RefUnwindSafe,
A: RefUnwindSafe,
AV: RefUnwindSafe,
L: RefUnwindSafe,
impl<N, K, L, W, WV, A, AV, S> Send for MetadataBuilder<N, K, L, W, WV, A, AV, S>
impl<N, K, L, W, WV, A, AV, S> Sync for MetadataBuilder<N, K, L, W, WV, A, AV, S>
impl<N, K, L, W, WV, A, AV, S> Unpin for MetadataBuilder<N, K, L, W, WV, A, AV, S>
impl<N, K, L, W, WV, A, AV, S> UnsafeUnpin for MetadataBuilder<N, K, L, W, WV, A, AV, S>where
N: UnsafeUnpin,
K: UnsafeUnpin,
impl<N, K, L, W, WV, A, AV, S> UnwindSafe for MetadataBuilder<N, K, L, W, WV, A, AV, S>where
N: UnwindSafe,
K: UnwindSafe,
W: RefUnwindSafe,
WV: RefUnwindSafe,
A: RefUnwindSafe,
AV: RefUnwindSafe,
L: RefUnwindSafe,
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