Struct AddrV2Message
pub struct AddrV2Message {
pub time: u32,
pub services: ServiceFlags,
pub addr: AddrV2,
pub port: u16,
}
Expand description
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
Implementations§
§impl AddrV2Message
impl AddrV2Message
pub fn socket_addr(&self) -> Result<SocketAddr, Error>
pub fn socket_addr(&self) -> Result<SocketAddr, Error>
Extract socket address from an AddrV2Message message. This will return io::Error io::ErrorKind::AddrNotAvailable if the address type can’t be converted into a SocketAddr.
Trait Implementations§
§impl Clone for AddrV2Message
impl Clone for AddrV2Message
§fn clone(&self) -> AddrV2Message
fn clone(&self) -> AddrV2Message
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for AddrV2Message
impl Debug for AddrV2Message
§impl Decodable for AddrV2Message
impl Decodable for AddrV2Message
§impl Encodable for AddrV2Message
impl Encodable for AddrV2Message
§impl Hash for AddrV2Message
impl Hash for AddrV2Message
§impl PartialEq for AddrV2Message
impl PartialEq for AddrV2Message
§impl ToSocketAddrs for AddrV2Message
impl ToSocketAddrs for AddrV2Message
§type Iter = Once<SocketAddr>
type Iter = Once<SocketAddr>
Returned iterator over socket addresses which this type may correspond
to.
§fn to_socket_addrs(
&self,
) -> Result<<AddrV2Message as ToSocketAddrs>::Iter, Error>
fn to_socket_addrs( &self, ) -> Result<<AddrV2Message as ToSocketAddrs>::Iter, Error>
Converts this object to an iterator of resolved
SocketAddr
s. Read moreimpl Eq for AddrV2Message
impl StructuralPartialEq for AddrV2Message
Auto Trait Implementations§
impl Freeze for AddrV2Message
impl RefUnwindSafe for AddrV2Message
impl Send for AddrV2Message
impl Sync for AddrV2Message
impl Unpin for AddrV2Message
impl UnwindSafe for AddrV2Message
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request