pub enum RouterReply {
    Ok,
    Workers(Vec<Address>),
    Sender {
        addr: Address,
        sender: MessageSender<RelayMessage>,
        wrap: bool,
    },
    State(bool),
}
Expand description

Successful return values from a router command

Variants

Ok

Success with no payload

Workers(Vec<Address>)

A list of worker addresses

Sender

Fields

addr: Address

The address a message is being sent to

sender: MessageSender<RelayMessage>

The relay sender

wrap: bool

Indicate whether the relay message needs to be constructed with router wrapping.

Message sender to a specific worker

State(bool)

Indicate the ‘ready’ state of an address

Implementations

Return [NodeReply::Ok]

Return [NodeReply::State]

Return [NodeError::NoSuchAddress]

Return [NodeError::WorkerExists] for the given address

Return [NodeError::RouterExists]

Return [NodeReply::Rejected(reason)]

Return [NodeReply::Rejected(reason)]

Return [NodeReply::Workers] for the given addresses

Return [NodeReply::Sender] for the given information

Consume the wrapper and return [NodeReply::Sender]

Consume the wrapper and return [NodeReply::Workers]

Consume the wrapper and return [NodeReply::State]

Returns Ok if self is [NodeReply::Ok]

Trait Implementations

Formats the value using the given formatter. 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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more