Trait FromRawEvent

Source
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§

Source

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.

Implementors§