Enum socketioxide::ProtocolVersion
source · pub enum ProtocolVersion {
V4 = 4,
V5 = 5,
}
Expand description
Socket.IO protocol version.
It is accessible with the Socket::protocol
method or as an extractor
Note: The socket.io protocol version does not correspond to the engine.io protocol version.
Variants§
V4 = 4
The socket.io protocol version 4, only available with the feature flag v4
V5 = 5
The socket.io protocol version 5, enabled by default
Trait Implementations§
source§impl Clone for ProtocolVersion
impl Clone for ProtocolVersion
source§fn clone(&self) -> ProtocolVersion
fn clone(&self) -> ProtocolVersion
Returns a copy 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 ProtocolVersion
impl Debug for ProtocolVersion
source§impl From<ProtocolVersion> for ProtocolVersion
impl From<ProtocolVersion> for ProtocolVersion
source§fn from(value: ProtocolVersion) -> Self
fn from(value: ProtocolVersion) -> Self
Converts to this type from the input type.
source§impl From<ProtocolVersion> for ProtocolVersion
impl From<ProtocolVersion> for ProtocolVersion
source§fn from(value: ProtocolVersion) -> Self
fn from(value: ProtocolVersion) -> Self
Converts to this type from the input type.
source§impl<A: Adapter> FromConnectParts<A> for ProtocolVersion
impl<A: Adapter> FromConnectParts<A> for ProtocolVersion
§type Error = Infallible
type Error = Infallible
The error type returned by the extractor
source§fn from_connect_parts(
s: &Arc<Socket<A>>,
_: &Option<String>
) -> Result<Self, Infallible>
fn from_connect_parts( s: &Arc<Socket<A>>, _: &Option<String> ) -> Result<Self, Infallible>
Extract the arguments from the connect event.
If it fails, the handler is not called
source§impl<A: Adapter> FromDisconnectParts<A> for ProtocolVersion
impl<A: Adapter> FromDisconnectParts<A> for ProtocolVersion
§type Error = Infallible
type Error = Infallible
The error type returned by the extractor
source§fn from_disconnect_parts(
s: &Arc<Socket<A>>,
_: DisconnectReason
) -> Result<Self, Infallible>
fn from_disconnect_parts( s: &Arc<Socket<A>>, _: DisconnectReason ) -> Result<Self, Infallible>
Extract the arguments from the disconnect event.
If it fails, the handler is not called
source§impl<A: Adapter> FromMessageParts<A> for ProtocolVersion
impl<A: Adapter> FromMessageParts<A> for ProtocolVersion
source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
source§fn eq(&self, other: &ProtocolVersion) -> bool
fn eq(&self, other: &ProtocolVersion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl RefUnwindSafe for ProtocolVersion
impl Send for ProtocolVersion
impl Sync for ProtocolVersion
impl Unpin for ProtocolVersion
impl UnwindSafe for ProtocolVersion
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