pub struct ClientSubnet { /* private fields */ }
Implementations
sourceimpl ClientSubnet
impl ClientSubnet
pub fn new(
source_prefix_len: u8,
scope_prefix_len: u8,
addr: IpAddr
) -> ClientSubnet
pub fn push<Target: OctetsBuilder + AsRef<[u8]> + AsMut<[u8]>>(
builder: &mut OptBuilder<'_, Target>,
source_prefix_len: u8,
scope_prefix_len: u8,
addr: IpAddr
) -> Result<(), ShortBuf>
pub fn source_prefix_len(&self) -> u8
pub fn scope_prefix_len(&self) -> u8
pub fn addr(&self) -> IpAddr
Trait Implementations
sourceimpl Clone for ClientSubnet
impl Clone for ClientSubnet
sourcefn clone(&self) -> ClientSubnet
fn clone(&self) -> ClientSubnet
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl CodeOptData for ClientSubnet
impl CodeOptData for ClientSubnet
sourceconst CODE: OptionCode = OptionCode::ClientSubnet
const CODE: OptionCode = OptionCode::ClientSubnet
The option code for this option.
sourceimpl Compose for ClientSubnet
impl Compose for ClientSubnet
sourcefn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the concrete representation of the value to the target. Read more
sourcefn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
fn compose_canonical<T: OctetsBuilder + AsMut<[u8]>>(
&self,
target: &mut T
) -> Result<(), ShortBuf>
Appends the canonical representation of the value to the target. Read more
sourceimpl Debug for ClientSubnet
impl Debug for ClientSubnet
sourceimpl<Octets> From<ClientSubnet> for AllOptData<Octets>
impl<Octets> From<ClientSubnet> for AllOptData<Octets>
sourcefn from(value: ClientSubnet) -> Self
fn from(value: ClientSubnet) -> Self
Converts to this type from the input type.
sourceimpl Hash for ClientSubnet
impl Hash for ClientSubnet
sourceimpl Ord for ClientSubnet
impl Ord for ClientSubnet
sourcefn cmp(&self, other: &ClientSubnet) -> Ordering
fn cmp(&self, other: &ClientSubnet) -> Ordering
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) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<Ref: AsRef<[u8]>> Parse<Ref> for ClientSubnet
impl<Ref: AsRef<[u8]>> Parse<Ref> for ClientSubnet
sourceimpl PartialEq<ClientSubnet> for ClientSubnet
impl PartialEq<ClientSubnet> for ClientSubnet
sourcefn eq(&self, other: &ClientSubnet) -> bool
fn eq(&self, other: &ClientSubnet) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<ClientSubnet> for ClientSubnet
impl PartialOrd<ClientSubnet> for ClientSubnet
sourcefn partial_cmp(&self, other: &ClientSubnet) -> Option<Ordering>
fn partial_cmp(&self, other: &ClientSubnet) -> 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
impl Copy for ClientSubnet
impl Eq for ClientSubnet
impl StructuralEq for ClientSubnet
impl StructuralPartialEq for ClientSubnet
Auto Trait Implementations
impl RefUnwindSafe for ClientSubnet
impl Send for ClientSubnet
impl Sync for ClientSubnet
impl Unpin for ClientSubnet
impl UnwindSafe for ClientSubnet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
sourcefn octets_into(self) -> Result<Target, ShortBuf>
fn octets_into(self) -> Result<Target, ShortBuf>
Performs the conversion.
sourceimpl<T> OptData for Twhere
T: CodeOptData + Compose,
impl<T> OptData for Twhere
T: CodeOptData + Compose,
sourcefn code(&self) -> OptionCode
fn code(&self) -> OptionCode
Returns the option code associated with this option.
sourceimpl<Octets, T> ParseOptData<Octets> for Twhere
Octets: AsRef<[u8]>,
T: CodeOptData + Parse<Octets> + Compose,
impl<Octets, T> ParseOptData<Octets> for Twhere
Octets: AsRef<[u8]>,
T: CodeOptData + Parse<Octets> + Compose,
sourcefn parse_option(
code: OptionCode,
parser: &mut Parser<Octets>
) -> Result<Option<T>, ParseError>
fn parse_option(
code: OptionCode,
parser: &mut Parser<Octets>
) -> Result<Option<T>, ParseError>
Parses the option code data. Read more