pub trait SharedTransport:
Stream<Item = Result<WsMessage, WsError>>
+ Unpin
+ Send
+ Sealed {
type Attached: Send;
// Required method
fn take_attached(&mut self) -> Self::Attached;
}Expand description
One stream’s view of a connection it shares with other streams: the raw frames carrying its own subscriptions, in the order the socket delivered them, and whatever the connection handed it on attaching.
Implemented by each sharing provider’s attachment, such as AlpacaAttachment. Sealed: only
this crate’s providers share a connection.
Required Associated Types§
Required Methods§
Sourcefn take_attached(&mut self) -> Self::Attached
fn take_attached(&mut self) -> Self::Attached
Take what the connection handed the stream on attaching. Called once, before any frame is read.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".