Struct poster::DisconnectOpts

source ·
pub struct DisconnectOpts<'a> { /* private fields */ }
Expand description

Disconnection options, represented as a consuming builder. Used during disconnection request, translated to the DISCONNECT packet.

Implementations§

Creates a new DisconnectOpts instance.

Sets a reason for disconnection.

Sets session expiration interval.

Arguments

val - Duration value less than u32::MAX in seconds.

Panics

When the duration in seconds is greater than u32::MAX.

Sets a reason string property.

Sets user properties. Multiple user properties may be set.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.