[−][src]Struct bitcoin::network::address::Address
A message which can be sent on the Bitcoin network
Fields
services: ServiceFlags
Services provided by the peer whose address this is
address: [u16; 8]
Network byte-order ipv6 address, or ipv4-mapped ipv6 address
port: u16
Network port
Methods
impl Address
[src]
pub fn new(socket: &SocketAddr, services: ServiceFlags) -> Address
[src]
Create an address message for a socket
pub fn socket_addr(&self) -> Result<SocketAddr, Error>
[src]
Extract socket address from an [Address] message. This will return [io::Error] [ErrorKind::AddrNotAvailable] if the message contains a Tor address.
Trait Implementations
impl Encodable for Address
[src]
impl Decodable for Address
[src]
fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>
[src]
impl Clone for Address
[src]
fn clone(&self) -> Address
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Address> for Address
[src]
impl Eq for Address
[src]
impl Debug for Address
[src]
impl Hash for Address
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl ToSocketAddrs for Address
[src]
type Iter = Once<SocketAddr>
Returned iterator over socket addresses which this type may correspond to. Read more
fn to_socket_addrs(&self) -> Result<Self::Iter, Error>
[src]
Auto Trait Implementations
impl Unpin for Address
impl Sync for Address
impl Send for Address
impl UnwindSafe for Address
impl RefUnwindSafe for Address
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,