Struct misskey_websocket::ReconnectConfig
source · [−]pub struct ReconnectConfig {
pub interval: Duration,
pub condition: ReconnectCondition,
pub retry_send: bool,
}Expand description
Reconnection configuration.
Fields
interval: DurationSets an interval duration of automatic reconnection.
condition: ReconnectConditionSpecifies the condition for reconnecting.
retry_send: boolSpecifies whether to re-send messages that may have failed to be sent when reconnecting.
Implementations
sourceimpl ReconnectConfig
impl ReconnectConfig
sourcepub fn none() -> ReconnectConfig
pub fn none() -> ReconnectConfig
Creates a ReconnectConfig that disables reconnection.
sourcepub fn with_condition(condition: ReconnectCondition) -> ReconnectConfig
pub fn with_condition(condition: ReconnectCondition) -> ReconnectConfig
Creates a ReconnectConfig with the given condition.
sourcepub fn with_interval(interval: Duration) -> ReconnectConfig
pub fn with_interval(interval: Duration) -> ReconnectConfig
Creates a ReconnectConfig with the given interval.
Trait Implementations
sourceimpl Clone for ReconnectConfig
impl Clone for ReconnectConfig
sourcefn clone(&self) -> ReconnectConfig
fn clone(&self) -> ReconnectConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ReconnectConfig
impl Debug for ReconnectConfig
sourceimpl Default for ReconnectConfig
impl Default for ReconnectConfig
sourcefn default() -> ReconnectConfig
fn default() -> ReconnectConfig
interval is 5 secs and retry_send is true by default.
Auto Trait Implementations
impl !RefUnwindSafe for ReconnectConfig
impl Send for ReconnectConfig
impl Sync for ReconnectConfig
impl Unpin for ReconnectConfig
impl !UnwindSafe for ReconnectConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more