Skip to main content

ReadMetadata

Trait ReadMetadata 

Source
pub trait ReadMetadata<'a, N, K, L, W, WV, A, AV>
where N: Field, K: Field, L: Field, W: Field, WV: WeightValue, A: Field, AV: AnnotationValue,
{ // Required methods fn id(&'a self) -> &'a Uuid; fn name(&'a self) -> Option<&'a N>; fn kind(&'a self) -> Option<&'a K>; fn labels(&'a self) -> impl Iterator<Item = &'a L> where L: 'a; fn weights(&'a self) -> impl Iterator<Item = (&'a W, &'a WV)> where W: 'a, WV: 'a; fn annotations(&'a self) -> impl Iterator<Item = (&'a A, &'a AV)> where A: 'a, AV: 'a; }
Expand description

Metadata read-only access trait.

Required Methods§

Source

fn id(&'a self) -> &'a Uuid

Get the ID from metadata.

Source

fn name(&'a self) -> Option<&'a N>

Get the name from metadata.

Source

fn kind(&'a self) -> Option<&'a K>

Get the kind from metadata.

Source

fn labels(&'a self) -> impl Iterator<Item = &'a L>
where L: 'a,

Get the labels from metadata.

Source

fn weights(&'a self) -> impl Iterator<Item = (&'a W, &'a WV)>
where W: 'a, WV: 'a,

Get the weights from metadata.

Source

fn annotations(&'a self) -> impl Iterator<Item = (&'a A, &'a AV)>
where A: 'a, AV: 'a,

Get the annotations from metadata.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, N, K, L, W, WV, A, AV> ReadMetadata<'a, N, K, L, W, WV, A, AV> for Metadata<N, K, L, W, WV, A, AV>
where N: Field, K: Field, L: Field, W: Field, WV: WeightValue, A: Field, AV: AnnotationValue,

Source§

impl<'a, N, K, L, W, WV, A, AV> ReadMetadata<'a, N, K, L, W, WV, A, AV> for MetadataRef<'a, N, K, L, W, WV, A, AV>
where N: Field, K: Field, L: Field, W: Field, WV: WeightValue, A: Field, AV: AnnotationValue,