Enum my_rust_socketio::payload::Payload
source · pub enum Payload {
Binary(Bytes),
String(String),
}
Expand description
A type which represents a payload
in the socket.io
context.
A payload could either be of the type Payload::Binary
, which holds
data in the Bytes
type that represents the payload or of the type
Payload::String
which holds a std::string::String
. The enum is
used for both representing data that’s send and data that’s received.
Variants§
Trait Implementations§
source§impl PartialEq<Payload> for Payload
impl PartialEq<Payload> for Payload
impl Eq for Payload
impl StructuralEq for Payload
impl StructuralPartialEq for Payload
Auto Trait Implementations§
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnwindSafe for Payload
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.