pub struct Port(/* private fields */);
Expand description
The TCP or UDP port to connect to when using an endpoint.
If this value is missing, the default port for the service should be used.
Implementations§
Trait Implementations§
source§impl ComposeSvcParamValue for Port
impl ComposeSvcParamValue for Port
source§fn compose_len(&self) -> u16
fn compose_len(&self) -> u16
Returns the length of the composed value.
source§fn compose_value<Target: OctetsBuilder + ?Sized>(
&self,
target: &mut Target,
) -> Result<(), Target::AppendError>
fn compose_value<Target: OctetsBuilder + ?Sized>( &self, target: &mut Target, ) -> Result<(), Target::AppendError>
Appends the wire format of the value to the end of
target
.source§impl Ord for Port
impl Ord for Port
source§impl<'a, Octs: Octets + ?Sized> ParseSvcParamValue<'a, Octs> for Port
impl<'a, Octs: Octets + ?Sized> ParseSvcParamValue<'a, Octs> for Port
source§fn parse_value(
key: SvcParamKey,
parser: &mut Parser<'a, Octs>,
) -> Result<Option<Self>, ParseError>
fn parse_value( key: SvcParamKey, parser: &mut Parser<'a, Octs>, ) -> Result<Option<Self>, ParseError>
Parse a parameter value from wire format. Read more
source§impl PartialEq for Port
impl PartialEq for Port
source§impl PartialOrd for Port
impl PartialOrd for Port
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 SvcParamValue for Port
impl SvcParamValue for Port
source§fn key(&self) -> SvcParamKey
fn key(&self) -> SvcParamKey
Returns the parameter key of the value.
impl Copy for Port
impl Eq for Port
impl StructuralPartialEq for Port
Auto Trait Implementations§
impl Freeze for Port
impl RefUnwindSafe for Port
impl Send for Port
impl Sync for Port
impl Unpin for Port
impl UnwindSafe for Port
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<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
source§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
Performs the conversion.
source§fn octets_into(self) -> Target
fn octets_into(self) -> Target
Performs an infallible conversion.