Enum ckb_network::TargetSession[][src]

pub enum TargetSession {
    All,
    Single(SessionId),
    Filter(Box<dyn Fn(&SessionId) + Send + 'static, Global>),
}
Expand description

When sending a message, select the specified session

Variants

All

Try broadcast

Single(SessionId)

Tuple Fields

Try send to only one

Filter(Box<dyn Fn(&SessionId) + Send + 'static, Global>)

Tuple Fields

0: Box<dyn Fn(&SessionId) + Send + 'static, Global>

Try send to some session, if return true, send to it

Trait Implementations

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

TODO(doc): @quake

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.