Trait CapsuleObserver
pub trait CapsuleObserver:
Send
+ Sync
+ 'static {
// Required methods
fn is_enabled(&self) -> bool;
fn created(&self, header: CapsuleHeader);
fn parsed(&self, header: CapsuleHeader);
}Available on crate features
http and std only.Expand description
A synchronous metadata observer. Methods must finish promptly without I/O, blocking or reentering the session. Header metadata contains no value bytes. Retained data and callback failures belong to the observer; observations must not control protocol behavior.
Required Methods§
fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Cheap dynamic gate, checked at the completion boundary.
fn created(&self, header: CapsuleHeader)
fn created(&self, header: CapsuleHeader)
A complete declared value was accepted by the sender, not necessarily delivered.
fn parsed(&self, header: CapsuleHeader)
fn parsed(&self, header: CapsuleHeader)
The decoder consumed the complete declared value, including skipped/forwarded values.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".