[][src]Struct misskey_websocket::ReconnectCondition

pub struct ReconnectCondition { /* fields omitted */ }

Specifies the condition for reconnecting.

Implementations

impl ReconnectCondition[src]

pub fn always() -> Self[src]

Creates a ReconnectCondition that reconnects regardless of the errors.

pub fn never() -> Self[src]

Creates a ReconnectCondition that does not reconnect regardless of the errors.

pub fn unexpected_reset() -> Self[src]

Creates a ReconnectCondition that reconnects when the connection is lost unexpectedly.

pub fn custom<F>(f: F) -> Self where
    F: Fn(&Error) -> bool + Send + Sync + 'static, 
[src]

Creates a custom ReconnectCondition using the passed function.

Trait Implementations

impl Clone for ReconnectCondition[src]

impl Debug for ReconnectCondition[src]

impl Default for ReconnectCondition[src]

pub fn default() -> ReconnectCondition[src]

unexpected_reset() is used as a default.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,