pub struct Endpoint { /* private fields */ }
Implementations§
source§impl Endpoint
impl Endpoint
pub fn protocol(&self) -> Protocol
pub fn set_protocol(&mut self, p: Protocol)
pub fn addr(&self) -> &SocketAddr
pub fn mut_addr(&mut self) -> &mut SocketAddr
pub fn is_same_ip_version(&self, other: &Endpoint) -> bool
pub fn is_same_ip_addr(&self, other: &Endpoint) -> bool
pub fn default_of(ep: &Endpoint) -> Self
pub fn default_tcp(ep: &Endpoint) -> Self
pub fn default_udp(ep: &Endpoint) -> Self
pub fn is_udp(&self) -> bool
pub fn is_tcp(&self) -> bool
pub fn is_sys_default(&self) -> bool
pub fn is_static_wan(&self) -> bool
pub fn is_mapped_wan(&self) -> bool
pub fn set_area(&mut self, area: EndpointArea)
Trait Implementations§
source§impl AsRef<Endpoint> for SignedEndpoint
impl AsRef<Endpoint> for SignedEndpoint
source§impl From<(Protocol, SocketAddr)> for Endpoint
impl From<(Protocol, SocketAddr)> for Endpoint
source§fn from(ps: (Protocol, SocketAddr)) -> Self
fn from(ps: (Protocol, SocketAddr)) -> Self
Converts to this type from the input type.
source§impl From<Endpoint> for SignedEndpoint
impl From<Endpoint> for SignedEndpoint
source§impl Into<Endpoint> for SignedEndpoint
impl Into<Endpoint> for SignedEndpoint
source§impl Ord for Endpoint
impl Ord for Endpoint
source§impl PartialEq<Endpoint> for Endpoint
impl PartialEq<Endpoint> for Endpoint
source§impl PartialOrd<Endpoint> for Endpoint
impl PartialOrd<Endpoint> for Endpoint
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'de> RawDecode<'de> for Endpoint
impl<'de> RawDecode<'de> for Endpoint
fn raw_decode(buf: &'de [u8]) -> Result<(Self, &'de [u8]), BuckyError>
fn raw_decode_with_option( buf: &'de [u8], _opt: &RawDecodeOption ) -> BuckyResult<(Self, &'de [u8])>
source§impl RawEncode for Endpoint
impl RawEncode for Endpoint
fn raw_measure( &self, _purpose: &Option<RawEncodePurpose> ) -> Result<usize, BuckyError>
fn raw_encode<'a>( &self, buf: &'a mut [u8], _purpose: &Option<RawEncodePurpose> ) -> Result<&'a mut [u8], BuckyError>
fn raw_tail_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose> ) -> BuckyResult<&'a [u8]>
fn raw_encode_to_buffer(&self) -> BuckyResult<Vec<u8>>
fn raw_hash_value(&self) -> BuckyResult<HashValue>
fn hash_buf(&self, encoded_buf: &[u8]) -> HashValue
fn raw_hash_encode(&self) -> BuckyResult<Vec<u8>>
source§impl RawFixedBytes for Endpoint
impl RawFixedBytes for Endpoint
source§impl ToSocketAddrs for Endpoint
impl ToSocketAddrs for Endpoint
§type Iter = <SocketAddr as ToSocketAddrs>::Iter
type Iter = <SocketAddr as ToSocketAddrs>::Iter
Returned iterator over socket addresses which this type may correspond
to.
source§fn to_socket_addrs(&self) -> Result<Self::Iter>
fn to_socket_addrs(&self) -> Result<Self::Iter>
Converts this object to an iterator of resolved
SocketAddr
s. Read more