[][src]Struct bitcoin::network::address::AddrV2Message

pub struct AddrV2Message {
    pub time: u32,
    pub services: ServiceFlags,
    pub addr: AddrV2,
    pub port: u16,
}

Address received from BIP155 addrv2 message

Fields

time: u32

Time that this node was last seen as connected to the network

services: ServiceFlags

Service bits

addr: AddrV2

Network ID + Network Address

port: u16

Network port, 0 if not applicable

Methods

impl AddrV2Message[src]

pub fn socket_addr(&self) -> Result<SocketAddr, Error>[src]

Extract socket address from an [AddrV2Message] message. This will return [io::Error] [ErrorKind::AddrNotAvailable] if the address type can't be converted into a [SocketAddr].

Trait Implementations

impl Encodable for AddrV2Message[src]

impl Decodable for AddrV2Message[src]

impl Clone for AddrV2Message[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<AddrV2Message> for AddrV2Message[src]

impl Eq for AddrV2Message[src]

impl Debug for AddrV2Message[src]

impl Hash for AddrV2Message[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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

impl ToSocketAddrs for AddrV2Message[src]

type Iter = Once<SocketAddr>

Returned iterator over socket addresses which this type may correspond to. Read more

Auto Trait Implementations

impl Unpin for AddrV2Message

impl Sync for AddrV2Message

impl Send for AddrV2Message

impl UnwindSafe for AddrV2Message

impl RefUnwindSafe for AddrV2Message

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]