Enum ckb_network::TargetProtocol[][src]

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

When dial, specify which protocol want to open

Variants

All

Try open all protocol

Single(ProtocolId)

Tuple Fields

Try open one protocol

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

Tuple Fields

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

Try open some protocol, if return true, open 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.