pub trait ProtocolEvent:
Clone
+ Send
+ Debug
+ 'static {
// Required methods
fn into_transport_event(self) -> TransportEvent;
fn session_id(&self) -> Option<SessionId>;
fn is_data_event(&self) -> bool;
fn is_error_event(&self) -> bool;
}Expand description
Protocol specific event trait
This trait allows each protocol to define its own specific event types while maintaining compatibility with the unified event system
Required Methods§
Sourcefn into_transport_event(self) -> TransportEvent
fn into_transport_event(self) -> TransportEvent
Convert to generic transport event
Sourcefn session_id(&self) -> Option<SessionId>
fn session_id(&self) -> Option<SessionId>
Get related session ID (if any)
Sourcefn is_data_event(&self) -> bool
fn is_data_event(&self) -> bool
Check if it’s a data transmission event
Sourcefn is_error_event(&self) -> bool
fn is_error_event(&self) -> bool
Check if it’s an error event
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.