pub enum Frame<'a> {
Json(&'a str),
Binary {
id: u8,
payload: &'a [u8],
},
}Expand description
One plaintext frame, classified by its leading message id.
Variants§
Json(&'a str)
A JSON message body (message id BINARY_MESSAGE_ID_JSON).
Binary
A binary message of the given id; payload is everything after the id byte.
Trait Implementations§
impl<'a> Copy for Frame<'a>
impl<'a> Eq for Frame<'a>
impl<'a> StructuralPartialEq for Frame<'a>
Auto Trait Implementations§
impl<'a> Forget for Frame<'a>
impl<'a> Freeze for Frame<'a>
impl<'a> Move for Frame<'a>
impl<'a> RefUnwindSafe for Frame<'a>
impl<'a> Send for Frame<'a>
impl<'a> Sync for Frame<'a>
impl<'a> Unpin for Frame<'a>
impl<'a> UnsafeUnpin for Frame<'a>
impl<'a> UnwindSafe for Frame<'a>
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