pub enum ServerFrame {
Connected(ConnectedFrame<'static>),
Receipt(ReceiptFrame<'static>),
Error(ErrorFrame<'static>),
Message(MessageFrame<'static>),
}Expand description
The ServerFrame enum contains a variant for each frame that the server can send.
The try_from(bytes: Vec<u8>) method, provided via an implementaton of TryFrom<Vec<u8>>, is the recommended way to obtain a Frame from a received message.
Variants§
Connected(ConnectedFrame<'static>)
Receipt(ReceiptFrame<'static>)
Error(ErrorFrame<'static>)
Message(MessageFrame<'static>)
Trait Implementations§
Source§impl Debug for ServerFrame
impl Debug for ServerFrame
Source§impl Into<Vec<u8>> for ServerFrame
This implementation serialises ServerFrame into a byte array.
impl Into<Vec<u8>> for ServerFrame
This implementation serialises ServerFrame into a byte array.
Auto Trait Implementations§
impl Freeze for ServerFrame
impl RefUnwindSafe for ServerFrame
impl Send for ServerFrame
impl Sync for ServerFrame
impl Unpin for ServerFrame
impl UnwindSafe for ServerFrame
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