Struct ockam_multiaddr::proto::Tcp
source · [−]pub struct Tcp(pub u16);
Expand description
A TCP port number.
Tuple Fields
0: u16
Implementations
Methods from Deref<Target = u16>
Trait Implementations
sourceimpl Ord for Tcp
impl Ord for Tcp
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<Tcp> for Tcp
impl PartialEq<Tcp> for Tcp
sourceimpl PartialOrd<Tcp> for Tcp
impl PartialOrd<Tcp> for Tcp
sourcefn partial_cmp(&self, other: &Tcp) -> Option<Ordering>
fn partial_cmp(&self, other: &Tcp) -> 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 Protocol<'_> for Tcp
impl Protocol<'_> for Tcp
sourcefn read_str(input: Checked<&str>) -> Result<Self, Error>
fn read_str(input: Checked<&str>) -> Result<Self, Error>
Parse the string value of this protocol.
sourcefn read_bytes(input: Checked<&[u8]>) -> Result<Self, Error>
fn read_bytes(input: Checked<&[u8]>) -> Result<Self, Error>
Decode the binary value of this protocol.
sourcefn write_str(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn write_str(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Write the protocol as a string, including the prefix.
sourcefn write_bytes(&self, buf: &mut dyn Buffer)
fn write_bytes(&self, buf: &mut dyn Buffer)
Write the protocol as a binary value, including the code.
impl Copy for Tcp
impl Eq for Tcp
impl StructuralEq for Tcp
impl StructuralPartialEq for Tcp
Auto Trait Implementations
impl RefUnwindSafe for Tcp
impl Send for Tcp
impl Sync for Tcp
impl Unpin for Tcp
impl UnwindSafe for Tcp
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