Struct bitcoin_addr::Address
source · pub struct Address {
pub service: Service,
pub n_time: u32,
pub n_services: ServiceFlags,
}
Expand description
| A Service with information about it | as peer |
Fields§
§service: Service
§n_time: u32
| Always included in serialization. |
n_services: ServiceFlags
| Serialized as uint64_t in V1, and as | | CompactSize in V2. |
Implementations§
source§impl Address
impl Address
pub fn set_sock_addr(&mut self, paddr: *const SocketAddr) -> bool
pub fn to_string(&self) -> String
pub fn get_port(&self) -> u16
pub fn get_sock_addr( &self, paddr: *mut SocketAddr, addrlen: *mut socklen_t ) -> bool
pub fn get_key(&self) -> Vec<u8>
pub fn is_reachable(&self) -> bool
pub fn is_relayable(&self) -> bool
pub fn serialize<Stream>(&self, s: &mut Stream)
pub fn unserialize<Stream>(&mut self, s: &mut Stream)
pub fn serialize_v1array(&self, arr: &mut [u8; 16])
pub fn serialize_v1stream<Stream>(&self, s: &mut Stream)
pub fn serialize_v2stream<Stream>(&self, s: &mut Stream)
pub fn unserialize_v1array(&mut self, arr: &mut [u8; 16])
pub fn unserialize_v1stream<Stream>(&mut self, s: &mut Stream)
pub fn unserialize_v2stream<Stream>(&mut self, s: &mut Stream)
pub fn get_bip155network(&self) -> BIP155Network
pub fn set_net_from_bip155network( &mut self, possible_bip155_net: u8, address_size: usize ) -> bool
pub fn setip(&mut self, ip_in: &NetAddr)
pub fn set_legacy_ipv6(&mut self, ipv6: &[u8])
pub fn set_internal(&mut self, name: &str) -> bool
pub fn set_special(&mut self, addr: &String) -> bool
pub fn set_tor(&mut self, addr: &String) -> bool
pub fn seti2p(&mut self, addr: &String) -> bool
pub fn is_bind_any(&self) -> bool
pub fn is_ipv4(&self) -> bool
pub fn is_ipv6(&self) -> bool
pub fn isrfc1918(&self) -> bool
pub fn isrfc2544(&self) -> bool
pub fn isrfc3927(&self) -> bool
pub fn isrfc6598(&self) -> bool
pub fn isrfc5737(&self) -> bool
pub fn isrfc3849(&self) -> bool
pub fn isrfc3964(&self) -> bool
pub fn isrfc6052(&self) -> bool
pub fn isrfc4380(&self) -> bool
pub fn isrfc4862(&self) -> bool
pub fn isrfc4193(&self) -> bool
pub fn isrfc6145(&self) -> bool
pub fn isrfc4843(&self) -> bool
pub fn isrfc7343(&self) -> bool
pub fn is_he_net(&self) -> bool
pub fn is_tor(&self) -> bool
pub fn isi2p(&self) -> bool
pub fn iscjdns(&self) -> bool
pub fn is_local(&self) -> bool
pub fn is_valid(&self) -> bool
pub fn is_routable(&self) -> bool
pub fn is_internal(&self) -> bool
pub fn is_addr_v1compatible(&self) -> bool
pub fn get_network(&self) -> Network
pub fn get_in_addr(&self, pipv_4addr: *mut InAddr) -> bool
pub fn get_in_6addr(&self, pipv_6addr: *mut In6Addr) -> bool
pub fn has_linked_ipv4(&self) -> bool
pub fn get_linked_ipv4(&self) -> u32
pub fn get_net_class(&self) -> Network
pub fn get_mappedas(&self, asmap: &Vec<bool>) -> u32
pub fn get_group(&self, asmap: &Vec<bool>) -> Vec<u8>
pub fn get_addr_bytes(&self) -> Vec<u8>
pub fn get_hash(&self) -> u64
pub fn get_reachability_from(&self, paddr_partner: *const NetAddr) -> i32
source§impl Address
impl Address
pub fn new(ip_in: Service, n_services_in: ServiceFlags) -> Self
pub fn new_with_time_in( ip_in: Service, n_services_in: ServiceFlags, n_time_in: u32 ) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<Address> for Address
impl PartialEq<Address> for Address
impl Eq for Address
Auto Trait Implementations§
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
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<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more