pub struct Frame<H, T> {
pub header: Option<H>,
pub body: Option<Either<Vec<u8>, T>>,
}Expand description
Decoded frame from buffer
Fields§
§header: Option<H>header of the frame
body: Option<Either<Vec<u8>, T>>body of the frame
Trait Implementations§
Auto Trait Implementations§
impl<H, T> Freeze for Frame<H, T>
impl<H, T> RefUnwindSafe for Frame<H, T>where
H: RefUnwindSafe,
T: RefUnwindSafe,
impl<H, T> Send for Frame<H, T>
impl<H, T> Sync for Frame<H, T>
impl<H, T> Unpin for Frame<H, T>
impl<H, T> UnwindSafe for Frame<H, T>where
H: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more