Struct kipa_lib::Address[][src]

pub struct Address {
    pub ip_data: Vec<u8>,
    pub port: u16,
}

An address of a node

Fields

The IP address data

Can either be 4 bytes long for IPv4, or 16 bytes long for IPv6.

The 16-bit port number of the address

Methods

impl Address
[src]

Create a new address with some address and port

Create a new address from a string

Get the local address on a specified interface

Create an Address from a SocketAddr

Get the SocketAddr for the address

Trait Implementations

impl Into<Result<Address>> for Address
[src]

Performs the conversion.

impl Clone for Address
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Address
[src]

impl PartialEq for Address
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for Address
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for Address
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Address

impl Sync for Address