Skip to main content

FromRawEvent

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".

Implementors§

Source§

impl<'raw_event, 'a, P, A> FromRawEvent<'raw_event> for AnyPluginEvent<'a, P, A>
where for<'b> P: EventSource + ToBytes + FromBytes<'b> + Debug, A: EventSource + ToBytes + FromBytes<'a> + Debug, 'raw_event: 'a,

Source§

impl<'raw_event, 'a, T> FromRawEvent<'raw_event> for AsyncEvent<'a, T>
where T: EventSource + FromBytes<'raw_event>, 'raw_event: 'a,

Source§

impl<'raw_event, T> FromRawEvent<'raw_event> for PluginEvent<T>
where T: EventSource + FromBytes<'raw_event>,