pub enum CollationEvent {
Message {
message: ParsedHttpMessage,
metadata: MessageMetadata,
},
Exchange(Exchange),
}Expand description
Events emitted by the collator
Variants§
Message
Individual message parsed and ready for processing
Fields
§
message: ParsedHttpMessageThe parsed HTTP message (request or response)
§
metadata: MessageMetadataConnection and timing metadata for this message
Exchange(Exchange)
Complete exchange with latency (request + response matched)
Implementations§
Source§impl CollationEvent
impl CollationEvent
Sourcepub fn is_message(&self) -> bool
pub fn is_message(&self) -> bool
Returns true if this is a Message event
Sourcepub fn is_exchange(&self) -> bool
pub fn is_exchange(&self) -> bool
Returns true if this is an Exchange event
Sourcepub fn as_message(&self) -> Option<(&ParsedHttpMessage, &MessageMetadata)>
pub fn as_message(&self) -> Option<(&ParsedHttpMessage, &MessageMetadata)>
Get the message if this is a Message event
Sourcepub fn as_exchange(&self) -> Option<&Exchange>
pub fn as_exchange(&self) -> Option<&Exchange>
Get the exchange if this is an Exchange event
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CollationEvent
impl RefUnwindSafe for CollationEvent
impl Send for CollationEvent
impl Sync for CollationEvent
impl Unpin for CollationEvent
impl UnsafeUnpin for CollationEvent
impl UnwindSafe for CollationEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more