pub trait FromEventData: Sized {
type Err: Error;
// Required method
fn from_data<S: AsRef<[u8]>>(data: S) -> Result<Self, Self::Err>;
// Provided method
fn only_id() -> bool { ... }
}
Required Associated Types§
Required Methods§
Provided Methods§
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.
Implementations on Foreign Types§
Source§impl FromEventData for String
Get the json string
impl FromEventData for String
Get the json string
Source§impl FromEventData for Vec<u8>
Get the event id
impl FromEventData for Vec<u8>
Get the event id