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 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 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
Source§type Error = Infallible
type Error = Infallible
The error type returned by the extractor
Source§fn from_connect_parts(
s: &Arc<Socket<A>>,
_: &Option<Value>,
) -> Result<Self, Infallible>
fn from_connect_parts( s: &Arc<Socket<A>>, _: &Option<Value>, ) -> 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
Source§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§type Error = Infallible
type Error = Infallible
The error type returned by the extractor
Source§fn from_message_parts(
s: &Arc<Socket<A>>,
_: &mut Value,
_: &Option<i64>,
) -> Result<Self, Infallible>
fn from_message_parts( s: &Arc<Socket<A>>, _: &mut Value, _: &Option<i64>, ) -> Result<Self, Infallible>
Extract the arguments from the message event.
If it fails, the handler is not called.
Source§impl PartialEq for ProtocolVersion
impl PartialEq for ProtocolVersion
impl Copy for ProtocolVersion
impl StructuralPartialEq for ProtocolVersion
Auto Trait Implementations§
impl Freeze for ProtocolVersion
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