pub struct PortReq {
pub port: PortNumber,
pub id: u32,
}
Expand description
A port connection request by the local endpoint.
The id can be set freely by the user. It is initialized to the port number.
Fields§
§port: PortNumber
The allocated, local port number.
id: u32
A user-specified id.
Implementations§
Trait Implementations§
source§impl From<PortNumber> for PortReq
impl From<PortNumber> for PortReq
source§fn from(port: PortNumber) -> Self
fn from(port: PortNumber) -> Self
Create a new port connection request with id
set to
the port number.
source§impl From<PortReq> for PortNumber
impl From<PortReq> for PortNumber
source§impl Ord for PortReq
impl Ord for PortReq
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for PortReq
impl PartialEq for PortReq
source§impl PartialOrd for PortReq
impl PartialOrd for PortReq
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 moreimpl Eq for PortReq
impl StructuralPartialEq for PortReq
Auto Trait Implementations§
impl Freeze for PortReq
impl RefUnwindSafe for PortReq
impl Send for PortReq
impl Sync for PortReq
impl Unpin for PortReq
impl UnwindSafe for PortReq
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