Enum tc_value::LinkAddress
source · [−]Expand description
The address portion of a Link
(an IP address)
Variants
IPv4(Ipv4Addr)
IPv6(Ipv6Addr)
Trait Implementations
sourceimpl Clone for LinkAddress
impl Clone for LinkAddress
sourceimpl Debug for LinkAddress
impl Debug for LinkAddress
sourceimpl Display for LinkAddress
impl Display for LinkAddress
sourceimpl From<IpAddr> for LinkAddress
impl From<IpAddr> for LinkAddress
sourcefn from(addr: IpAddr) -> LinkAddress
fn from(addr: IpAddr) -> LinkAddress
Converts to this type from the input type.
sourceimpl From<Ipv4Addr> for LinkAddress
impl From<Ipv4Addr> for LinkAddress
sourcefn from(addr: Ipv4Addr) -> LinkAddress
fn from(addr: Ipv4Addr) -> LinkAddress
Converts to this type from the input type.
sourceimpl From<Ipv6Addr> for LinkAddress
impl From<Ipv6Addr> for LinkAddress
sourcefn from(addr: Ipv6Addr) -> LinkAddress
fn from(addr: Ipv6Addr) -> LinkAddress
Converts to this type from the input type.
sourceimpl Hash for LinkAddress
impl Hash for LinkAddress
sourceimpl PartialEq<IpAddr> for LinkAddress
impl PartialEq<IpAddr> for LinkAddress
sourceimpl PartialEq<Ipv4Addr> for LinkAddress
impl PartialEq<Ipv4Addr> for LinkAddress
sourceimpl PartialEq<Ipv6Addr> for LinkAddress
impl PartialEq<Ipv6Addr> for LinkAddress
sourceimpl PartialEq<LinkAddress> for LinkAddress
impl PartialEq<LinkAddress> for LinkAddress
sourcefn eq(&self, other: &LinkAddress) -> bool
fn eq(&self, other: &LinkAddress) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LinkAddress) -> bool
fn ne(&self, other: &LinkAddress) -> bool
This method tests for !=
.
impl Eq for LinkAddress
impl StructuralEq for LinkAddress
impl StructuralPartialEq for LinkAddress
Auto Trait Implementations
impl RefUnwindSafe for LinkAddress
impl Send for LinkAddress
impl Sync for LinkAddress
impl Unpin for LinkAddress
impl UnwindSafe for LinkAddress
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
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns Some(T)
if self
can be cast into T
, otherwise None
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.