Struct bililive_core::retry::WsStream [−][src]
pub struct WsStream<T: WsStreamTrait<E>, E>(_);Expand description
Wrapper for types implementing WsStreamTrait.
This type is used to avoid the orphan rule. Exposed for stream type construction.
Implementations
Trait Implementations
impl<T, E> UnderlyingStream<RetryContext, Result<Packet, StreamError<E>>, StreamError<E>> for WsStream<T, E> where
T: WsStreamTrait<E>,
E: Error,
impl<T, E> UnderlyingStream<RetryContext, Result<Packet, StreamError<E>>, StreamError<E>> for WsStream<T, E> where
T: WsStreamTrait<E>,
E: Error,
fn establish(
ctor_arg: RetryContext
) -> Pin<Box<dyn Future<Output = Result<Self::Stream, StreamError<E>>>>>
fn establish(
ctor_arg: RetryContext
) -> Pin<Box<dyn Future<Output = Result<Self::Stream, StreamError<E>>>>>
The creation function is used by ReconnectStream in order to establish both the initial IO connection in addition to performing reconnects. Read more
When sink send experience an Error during operation, it does not necessarily mean
it is a disconnect/termination (ex: WouldBlock).
You may specify which errors are considered “disconnects” by this method. Read more
It’s common practice for [Stream] implementations that return an Err
when there’s an error.
You may match the result to tell them apart from normal response.
By default, no response is considered a “disconnect”. Read more
This is returned when retry quota exhausted.