Struct bitcoin::network::address::Address [−][src]
A message which can be sent on the Bitcoin network
Fields
services: u64
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]
impl Address
pub fn new(socket: &SocketAddr, services: u64) -> Address
[src]
pub fn new(socket: &SocketAddr, services: u64) -> Address
Create an address message for a socket
pub fn socket_addr(&self) -> Result<SocketAddr, Error>
[src]
pub fn socket_addr(&self) -> Result<SocketAddr, Error>
extract socket address from an address message This will return io::Error ErrorKind::AddrNotAvailable if the message contains a Tor address.
Trait Implementations
impl<S: SimpleEncoder> ConsensusEncodable<S> for Address
[src]
impl<S: SimpleEncoder> ConsensusEncodable<S> for Address
fn consensus_encode(&self, s: &mut S) -> Result<(), Error>
[src]
fn consensus_encode(&self, s: &mut S) -> Result<(), Error>
Encode an object with a well-defined format
impl<D: SimpleDecoder> ConsensusDecodable<D> for Address
[src]
impl<D: SimpleDecoder> ConsensusDecodable<D> for Address
fn consensus_decode(d: &mut D) -> Result<Address, Error>
[src]
fn consensus_decode(d: &mut D) -> Result<Address, Error>
Decode an object with a well-defined format
impl Debug for Address
[src]
impl Debug for Address
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Address
[src]
impl Clone for Address
fn clone(&self) -> Address
[src]
fn clone(&self) -> Address
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Address
[src]
impl PartialEq for Address
fn eq(&self, other: &Address) -> bool
[src]
fn eq(&self, other: &Address) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Eq for Address
[src]
impl Eq for Address