Enum diem_types::network_address::Protocol
source · 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§
source§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
.source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
source§impl<'de> Deserialize<'de> for Protocol
impl<'de> Deserialize<'de> for Protocol
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Protocol> for NetworkAddress
impl From<Protocol> for NetworkAddress
source§fn from(proto: Protocol) -> NetworkAddress
fn from(proto: Protocol) -> NetworkAddress
Converts to this type from the input type.
source§impl PartialEq<Protocol> for Protocol
impl PartialEq<Protocol> for Protocol
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> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.