Trait FromRawEvent
pub trait FromRawEvent<'a>: Sized {
// Required method
fn parse(raw_event: &RawEvent<'a>) -> Result<Self, PayloadFromBytesError>;
}
Expand description
A trait for types that can be converted from a raw event
Required Methods§
fn parse(raw_event: &RawEvent<'a>) -> Result<Self, PayloadFromBytesError>
fn parse(raw_event: &RawEvent<'a>) -> Result<Self, PayloadFromBytesError>
Parse a raw event into the type implementing this trait
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.