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>§
pub const MIN: u16 = 0u16
pub const MAX: u16 = 65_535u16
pub const BITS: u32 = 16u32
Trait Implementations§
source§impl Ord for Tcp
impl Ord for Tcp
source§impl PartialOrd for Tcp
impl PartialOrd for Tcp
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 Protocol<'_> for Tcp
impl Protocol<'_> for Tcp
source§fn read_str(input: Checked<&str>) -> Result<Self, Error>
fn read_str(input: Checked<&str>) -> Result<Self, Error>
Parse the string value of this protocol.
source§fn read_bytes(input: Checked<&[u8]>) -> Result<Self, Error>
fn read_bytes(input: Checked<&[u8]>) -> Result<Self, Error>
Decode the binary value of this protocol.
source§fn 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.
source§fn 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 StructuralPartialEq for Tcp
Auto Trait Implementations§
impl Freeze for Tcp
impl RefUnwindSafe for Tcp
impl Send for Tcp
impl Sync for Tcp
impl Unpin for Tcp
impl UnwindSafe for Tcp
Blanket Implementations§
source§impl<D> AsyncTryClone for D
impl<D> AsyncTryClone for D
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