pub struct Endpoint { /* private fields */ }Implementations
sourceimpl 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 set_static_wan(&mut self, is_wan: bool)
pub fn set_system_default(&mut self, is_system_default: bool)
Trait Implementations
sourceimpl AsRef<Endpoint> for SignedEndpoint
impl AsRef<Endpoint> for SignedEndpoint
sourceimpl From<(Protocol, SocketAddr)> for Endpoint
impl From<(Protocol, SocketAddr)> for Endpoint
sourcefn from(ps: (Protocol, SocketAddr)) -> Self
fn from(ps: (Protocol, SocketAddr)) -> Self
Converts to this type from the input type.
sourceimpl From<Endpoint> for SignedEndpoint
impl From<Endpoint> for SignedEndpoint
sourceimpl Into<Endpoint> for SignedEndpoint
impl Into<Endpoint> for SignedEndpoint
sourceimpl Ord for Endpoint
impl Ord for Endpoint
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Endpoint> for Endpoint
impl PartialEq<Endpoint> for Endpoint
sourceimpl PartialOrd<Endpoint> for Endpoint
impl PartialOrd<Endpoint> for Endpoint
sourcefn partial_cmp(&self, other: &Endpoint) -> Option<Ordering>
fn partial_cmp(&self, other: &Endpoint) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl<'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])>
sourceimpl 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>>
sourceimpl RawFixedBytes for Endpoint
impl RawFixedBytes for Endpoint
sourceimpl 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. Read more
sourcefn to_socket_addrs(&self) -> Result<Self::Iter>
fn to_socket_addrs(&self) -> Result<Self::Iter>
Converts this object to an iterator of resolved SocketAddrs. Read more
impl Copy for Endpoint
impl Eq for Endpoint
impl StructuralEq for Endpoint
Auto Trait Implementations
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more