Trait wire_framed::FromFrame
source · pub trait FromFrame: Sized {
type Error;
// Required method
fn parse_frame(frame: &mut Bytes) -> Result<Self, Self::Error>;
// Provided method
fn from_frame(frame: Bytes) -> Result<Self, Self::Error> { ... }
}Expand description
Trait for converting a frame into `Self.
Required Associated Types§
Required Methods§
sourcefn parse_frame(frame: &mut Bytes) -> Result<Self, Self::Error>
fn parse_frame(frame: &mut Bytes) -> Result<Self, Self::Error>
Parse a frame into a Self.
Provided Methods§
sourcefn from_frame(frame: Bytes) -> Result<Self, Self::Error>
fn from_frame(frame: Bytes) -> Result<Self, Self::Error>
Convert a frame into a Self.