pub trait StreamEventExt<M>: Sized {
// Required methods
fn from_message(msg: M) -> Self;
fn from_error(err: String) -> Self;
fn partial(partial: String, error: Option<String>) -> Self;
}Expand description
Small conversion trait so endpoint-specific event enums can be constructed
from a successful message M, an error string, or a partial payload.
Required Methods§
Sourcefn from_message(msg: M) -> Self
fn from_message(msg: M) -> Self
Create an event from a successfully deserialized message.
Sourcefn from_error(err: String) -> Self
fn from_error(err: String) -> Self
Create an event from an error string.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".