Struct mmids_core::workflows::metadata::MetadataKeyMap
source · pub struct MetadataKeyMap { /* private fields */ }
Expand description
Creates distinct metadata keys for each unique combination of metadata name and value type.
If the same name and type pair are registered on the same MetadataKeyMap
instance, then those
keys returned are guaranteed to be equal to each other.
Keys created between different instances of MetadataKeyMap
are not guaranteed (nor likely)
to be consistent. Therefore, keys should only be compared with keys created by the same map
instance, and in most cases you probably only want one instance for the whole process.
Implementations
sourceimpl MetadataKeyMap
impl MetadataKeyMap
sourcepub fn register(
&mut self,
name: &'static str,
value_type: MetadataValueType
) -> MetadataKey
pub fn register(
&mut self,
name: &'static str,
value_type: MetadataValueType
) -> MetadataKey
Registers the supplied metadata name and value type pair with the key map. If this
pair has not been registered yet then a new MetadataKey
will be generated and returned.
If the same pair has already been registered, then the pre-generated key will be returned
Trait Implementations
sourceimpl Default for MetadataKeyMap
impl Default for MetadataKeyMap
sourcefn default() -> MetadataKeyMap
fn default() -> MetadataKeyMap
Auto Trait Implementations
impl RefUnwindSafe for MetadataKeyMap
impl Send for MetadataKeyMap
impl Sync for MetadataKeyMap
impl Unpin for MetadataKeyMap
impl UnwindSafe for MetadataKeyMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more