Struct floresta_wire::address_man::LocalAddress
source · pub struct LocalAddress {
pub id: usize,
/* private fields */
}
Expand description
How do we store peers locally
Fields§
§id: usize
Random id for this peer
Implementations§
source§impl LocalAddress
impl LocalAddress
pub fn new( address: AddrV2, last_connected: u64, state: AddressState, services: ServiceFlags, port: u16, id: usize ) -> LocalAddress
sourcepub fn get_net_address(&self) -> IpAddr
pub fn get_net_address(&self) -> IpAddr
Return an IP address associated with this peer address
sourcepub fn get_address(&self) -> AddrV2
pub fn get_address(&self) -> AddrV2
Returns the actual address, as defined in AddrV2. This is useful if we are trying a peer that needs a proxy like Tor.
Trait Implementations§
source§impl Clone for LocalAddress
impl Clone for LocalAddress
source§fn clone(&self) -> LocalAddress
fn clone(&self) -> LocalAddress
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 moresource§impl Debug for LocalAddress
impl Debug for LocalAddress
source§impl From<AddrV2> for LocalAddress
impl From<AddrV2> for LocalAddress
source§impl From<AddrV2Message> for LocalAddress
impl From<AddrV2Message> for LocalAddress
source§fn from(value: AddrV2Message) -> Self
fn from(value: AddrV2Message) -> Self
Converts to this type from the input type.
source§impl From<DiskLocalAddress> for LocalAddress
impl From<DiskLocalAddress> for LocalAddress
source§fn from(value: DiskLocalAddress) -> Self
fn from(value: DiskLocalAddress) -> Self
Converts to this type from the input type.
source§impl From<LocalAddress> for DiskLocalAddress
impl From<LocalAddress> for DiskLocalAddress
source§fn from(value: LocalAddress) -> Self
fn from(value: LocalAddress) -> Self
Converts to this type from the input type.
source§impl FromStr for LocalAddress
impl FromStr for LocalAddress
source§impl PartialEq<LocalAddress> for LocalAddress
impl PartialEq<LocalAddress> for LocalAddress
source§fn eq(&self, other: &LocalAddress) -> bool
fn eq(&self, other: &LocalAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<&str> for LocalAddress
impl TryFrom<&str> for LocalAddress
impl StructuralPartialEq for LocalAddress
Auto Trait Implementations§
impl RefUnwindSafe for LocalAddress
impl Send for LocalAddress
impl Sync for LocalAddress
impl Unpin for LocalAddress
impl UnwindSafe for LocalAddress
Blanket Implementations§
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