pub trait GetMeta {
type Metadata: Default;
// Required methods
fn get_meta_mut(&mut self) -> &mut Self::Metadata;
fn get_meta(&self) -> &Self::Metadata;
}Expand description
Access to the metadata carried by a message envelope’s Extensions.
The metadata type differs by message kind: requests carry a
RequestMetaObject and notifications carry a NotificationMetaObject.
The envelope extensions are the canonical runtime location for _meta:
deserialization strips the wire params._meta into the extensions (typed
params meta fields stay empty), and the service loop moves it into
RequestContext::meta / NotificationContext::meta before dispatch.
Typed params meta fields are honored when serializing outgoing messages;
on key conflicts the extensions-level metadata wins.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".