pub struct MessageData(pub Bytes);
Expand description
Extract the raw data of a message from a frame. This gives you the
unprocessed data of the message in Bytes
form. Other parts of
the system presume JSON encoding and things like that, but this
will let you determine what format you like.
Tuple Fields§
§0: Bytes
Trait Implementations§
Source§impl Clone for MessageData
impl Clone for MessageData
Source§fn clone(&self) -> MessageData
fn clone(&self) -> MessageData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MessageData
impl Debug for MessageData
Source§impl<State> Extractor<State> for MessageData
impl<State> Extractor<State> for MessageData
Source§type Error = MessageFrameError
type Error = MessageFrameError
The error type for this extractor. Anything that can be converted into an extractor error
can be used as an error type. Read more
Source§fn extract(frame: Frame, context: &Context<State>) -> Result<Self, Self::Error>where
Self: Sized,
fn extract(frame: Frame, context: &Context<State>) -> Result<Self, Self::Error>where
Self: Sized,
Take an frame and a state and return a result containing the extracted value or the frame.
Source§impl PartialEq for MessageData
impl PartialEq for MessageData
impl Eq for MessageData
impl StructuralPartialEq for MessageData
Auto Trait Implementations§
impl !Freeze for MessageData
impl RefUnwindSafe for MessageData
impl Send for MessageData
impl Sync for MessageData
impl Unpin for MessageData
impl UnwindSafe for MessageData
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