Enum diem_sdk::types::network_address::Protocol
pub enum Protocol {
Ip4(Ipv4Addr),
Ip6(Ipv6Addr),
Dns(DnsName),
Dns4(DnsName),
Dns6(DnsName),
Tcp(u16),
Memory(u16),
NoiseIK(PublicKey),
Handshake(u8),
}
Expand description
A single protocol in the NetworkAddress
protocol stack.
Variants§
Ip4(Ipv4Addr)
Ip6(Ipv6Addr)
Dns(DnsName)
Dns4(DnsName)
Dns6(DnsName)
Tcp(u16)
Memory(u16)
NoiseIK(PublicKey)
Handshake(u8)
Trait Implementations§
§impl Arbitrary for Protocol
impl Arbitrary for Protocol
§type Parameters = (<Ipv4Addr as Arbitrary>::Parameters, <Ipv6Addr as Arbitrary>::Parameters, <DnsName as Arbitrary>::Parameters, <DnsName as Arbitrary>::Parameters, <DnsName as Arbitrary>::Parameters, <u16 as Arbitrary>::Parameters, <u16 as Arbitrary>::Parameters, <PublicKey as Arbitrary>::Parameters, <u8 as Arbitrary>::Parameters)
type Parameters = (<Ipv4Addr as Arbitrary>::Parameters, <Ipv6Addr as Arbitrary>::Parameters, <DnsName as Arbitrary>::Parameters, <DnsName as Arbitrary>::Parameters, <DnsName as Arbitrary>::Parameters, <u16 as Arbitrary>::Parameters, <u16 as Arbitrary>::Parameters, <PublicKey as Arbitrary>::Parameters, <u8 as Arbitrary>::Parameters)
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = TupleUnion<((u32, Arc<Map<<Ipv4Addr as Arbitrary>::Strategy, fn(_: Ipv4Addr) -> Protocol>>), (u32, Arc<Map<<Ipv6Addr as Arbitrary>::Strategy, fn(_: Ipv6Addr) -> Protocol>>), (u32, Arc<Map<<DnsName as Arbitrary>::Strategy, fn(_: DnsName) -> Protocol>>), (u32, Arc<Map<<DnsName as Arbitrary>::Strategy, fn(_: DnsName) -> Protocol>>), (u32, Arc<Map<<DnsName as Arbitrary>::Strategy, fn(_: DnsName) -> Protocol>>), (u32, Arc<Map<<u16 as Arbitrary>::Strategy, fn(_: u16) -> Protocol>>), (u32, Arc<Map<<u16 as Arbitrary>::Strategy, fn(_: u16) -> Protocol>>), (u32, Arc<Map<<PublicKey as Arbitrary>::Strategy, fn(_: PublicKey) -> Protocol>>), (u32, Arc<Map<<u8 as Arbitrary>::Strategy, fn(_: u8) -> Protocol>>))>
type Strategy = TupleUnion<((u32, Arc<Map<<Ipv4Addr as Arbitrary>::Strategy, fn(_: Ipv4Addr) -> Protocol>>), (u32, Arc<Map<<Ipv6Addr as Arbitrary>::Strategy, fn(_: Ipv6Addr) -> Protocol>>), (u32, Arc<Map<<DnsName as Arbitrary>::Strategy, fn(_: DnsName) -> Protocol>>), (u32, Arc<Map<<DnsName as Arbitrary>::Strategy, fn(_: DnsName) -> Protocol>>), (u32, Arc<Map<<DnsName as Arbitrary>::Strategy, fn(_: DnsName) -> Protocol>>), (u32, Arc<Map<<u16 as Arbitrary>::Strategy, fn(_: u16) -> Protocol>>), (u32, Arc<Map<<u16 as Arbitrary>::Strategy, fn(_: u16) -> Protocol>>), (u32, Arc<Map<<PublicKey as Arbitrary>::Strategy, fn(_: PublicKey) -> Protocol>>), (u32, Arc<Map<<u8 as Arbitrary>::Strategy, fn(_: u8) -> Protocol>>))>
The type of
Strategy
used to generate values of type Self
.§fn arbitrary_with(
_top: <Protocol as Arbitrary>::Parameters
) -> <Protocol as Arbitrary>::Strategy
fn arbitrary_with( _top: <Protocol as Arbitrary>::Parameters ) -> <Protocol as Arbitrary>::Strategy
§impl<'de> Deserialize<'de> for Protocol
impl<'de> Deserialize<'de> for Protocol
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Protocol, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Protocol, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<Protocol> for NetworkAddress
impl From<Protocol> for NetworkAddress
§fn from(proto: Protocol) -> NetworkAddress
fn from(proto: Protocol) -> NetworkAddress
Converts to this type from the input type.
§impl Serialize for Protocol
impl Serialize for Protocol
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Protocol
impl StructuralEq for Protocol
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.