pub trait FromConnectParts<A: Adapter>: Sized {
type Error: Error + Send + 'static;
// Required method
fn from_connect_parts(
s: &Arc<Socket<A>>,
auth: &Option<Value>,
) -> Result<Self, Self::Error>;
}Expand description
A trait used to extract the arguments from the connect event.
The Result associated type is used to return an error if the extraction fails,
in this case the ConnectHandler is not called.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl<A: Adapter> FromConnectParts<A> for ProtocolVersion
impl<A: Adapter> FromConnectParts<A> for ProtocolVersion
type Error = Infallible
Source§impl<A: Adapter> FromConnectParts<A> for TransportType
impl<A: Adapter> FromConnectParts<A> for TransportType
type Error = Infallible
Source§impl<A: Adapter> FromConnectParts<A> for SocketRef<A>
impl<A: Adapter> FromConnectParts<A> for SocketRef<A>
type Error = Infallible
Source§impl<A: Adapter> FromConnectParts<A> for SocketIo<A>
impl<A: Adapter> FromConnectParts<A> for SocketIo<A>
type Error = Infallible
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for Extension<T>
Available on crate feature extensions only.
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for Extension<T>
Available on crate feature
extensions only.type Error = ExtensionNotFound<T>
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for HttpExtension<T>
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for HttpExtension<T>
type Error = ExtensionNotFound<T>
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for MaybeExtension<T>
Available on crate feature extensions only.
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for MaybeExtension<T>
Available on crate feature
extensions only.type Error = Infallible
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for MaybeHttpExtension<T>
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for MaybeHttpExtension<T>
type Error = Infallible
Source§impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for State<T>
Available on crate feature state only.
impl<A: Adapter, T: Clone + Send + Sync + 'static> FromConnectParts<A> for State<T>
Available on crate feature
state only.