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)

Try send to only one

Tuple Fields of Single

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

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

Tuple Fields of Filter

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

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.