Skip to main content

NodeIpAddress

Trait NodeIpAddress 

Source
pub trait NodeIpAddress:
    Debug
    + Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn octets_vec(&self) -> Vec<u8> ;
}
Expand description

Trait for IP addresses that can be used in node ID generation

Required Methods§

Source

fn octets_vec(&self) -> Vec<u8>

Get the octets of this IP address for hashing

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NodeIpAddress for Ipv4Addr

Source§

impl NodeIpAddress for Ipv6Addr

Implementors§