Enum tentacle::service::TargetProtocol
source · pub enum TargetProtocol {
All,
Single(ProtocolId),
Filter(Box<dyn Fn(&ProtocolId) -> bool + Sync + Send + 'static>),
}
Expand description
When dial, specify which protocol want to open
Variants§
All
Try open all protocol
Single(ProtocolId)
Try open one protocol
Filter(Box<dyn Fn(&ProtocolId) -> bool + Sync + Send + 'static>)
Try open some protocol, if return true, open it
Trait Implementations§
source§impl From<ProtocolId> for TargetProtocol
impl From<ProtocolId> for TargetProtocol
source§fn from(id: ProtocolId) -> Self
fn from(id: ProtocolId) -> Self
Converts to this type from the input type.