pub enum Value {
Str(Str, Option<VecDeque<Bytes>>),
Bytes(Bytes),
}
Expand description
Represents a value that can be sent over the engine.io wire as an engine.io packet
or the data that can be outputed by a binary parser (e.g. MsgPackParser
)
or a string parser (e.g. CommonParser
)).
If you want to deserialize this value to a specific type. You should manually call the Data
extractor.
Variants§
Str(Str, Option<VecDeque<Bytes>>)
A string payload that will be sent as a string engine.io packet. It can also contain adjacent binary payloads.
Bytes(Bytes)
A binary payload that will be sent as a binary engine.io packet
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl !Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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