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 PartialOrd for Endpoint
impl PartialOrd for Endpoint
Source§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
Source§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 moreimpl Copy for Endpoint
impl Eq for Endpoint
Auto Trait Implementations§
impl Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, D> FileDecoder<'de> for Dwhere
D: RawDecode<'de>,
impl<'de, D> FileDecoder<'de> for Dwhere
D: RawDecode<'de>,
fn decode_from_file( file: &Path, buf: &'de mut Vec<u8>, ) -> Result<(D, usize), BuckyError>
Source§impl<D> FileEncoder<D> for Dwhere
D: RawEncode,
impl<D> FileEncoder<D> for Dwhere
D: RawEncode,
fn suggest_buffer_size(&self) -> Result<usize, BuckyError>
fn encode<'a>( &self, buf: &'a mut [u8], _is_compress: bool, ) -> Result<&'a mut [u8], BuckyError>
fn encode_to_writer( &self, writer: impl Write, is_compress: bool, ) -> BuckyResult<usize>
fn encode_to_file(&self, file: &Path, is_compress: bool) -> BuckyResult<usize>
fn encode_to_vec(&self, is_compress: bool) -> BuckyResult<Vec<u8>>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more