pub trait PubSubMetadata: Metadata {
// Required method
fn session(&self) -> Option<Arc<Session>>;
}
Expand description
Metadata extension for pub-sub method handling.
NOTE storing PubSubMetadata
(or rather storing Arc<Session>
) in
any other place outside of the handler will prevent unsubscribe
methods
to be called in case the Session
is dropped (i.e. transport connection is closed).
Required Methods§
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.