[][src]Struct serenity::client::bridge::gateway::ShardManagerMonitor

pub struct ShardManagerMonitor {
    pub manager: Arc<Mutex<ShardManager>>,
    pub rx: Receiver<ShardManagerMessage>,
}

The shard manager monitor does what it says on the tin -- it monitors the shard manager and performs actions on it as received.

The monitor is essentially responsible for running in its own thread and receiving ShardManagerMessages, such as whether to shutdown a shard or shutdown everything entirely.

Fields

An clone of the Arc to the manager itself.

The mpsc Receiver channel to receive shard manager messages over.

Methods

impl ShardManagerMonitor
[src]

"Runs" the monitor, waiting for messages over the Receiver.

This should be called in its own thread due to its blocking, looped nature.

This will continue running until either:

  • a ShardManagerMessage::ShutdownAll has been received
  • an error is returned while receiving a message from the channel (probably indicating that the shard manager should stop anyway)

Trait Implementations

impl Debug for ShardManagerMonitor
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

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

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<T> DebugAny for T where
    T: Any + Debug
[src]

impl<T> UnsafeAny for T where
    T: Any