Struct bililive_core::retry::RetryContext [−][src]
pub struct RetryContext { /* fields omitted */ }Expand description
Internal context for server picking during (re)connection.
Implements a round-robin policy for server selection.
Implementations
Trait Implementations
Performs the conversion.
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.
Auto Trait Implementations
impl RefUnwindSafe for RetryContext
impl Send for RetryContext
impl Sync for RetryContext
impl Unpin for RetryContext
impl UnwindSafe for RetryContext
Blanket Implementations
Mutably borrows from an owned value. Read more