Struct net_types::ip::IpVersionMarker
source · pub struct IpVersionMarker<I: Ip> { /* private fields */ }
Expand description
A zero-sized type that carries IP version information.
IpVersionMarker
is typically used by types that are generic over IP
version, but without any other associated data. In this sense,
IpVersionMarker
behaves similarly to PhantomData
.
Implementations§
Trait Implementations§
source§impl<I: Clone + Ip> Clone for IpVersionMarker<I>
impl<I: Clone + Ip> Clone for IpVersionMarker<I>
source§fn clone(&self) -> IpVersionMarker<I>
fn clone(&self) -> IpVersionMarker<I>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<I: Ip> Debug for IpVersionMarker<I>
impl<I: Ip> Debug for IpVersionMarker<I>
source§impl<I: Ip> Default for IpVersionMarker<I>
impl<I: Ip> Default for IpVersionMarker<I>
source§impl<I: Ip, IpType> GenericOverIp<IpType> for IpVersionMarker<I>where
IpType: Ip,
impl<I: Ip, IpType> GenericOverIp<IpType> for IpVersionMarker<I>where
IpType: Ip,
§type Type = IpVersionMarker<IpType>
type Type = IpVersionMarker<IpType>
The type of
Self
when its IP-generic parameter is replaced with the
type NewIp
.source§impl<I: Ord + Ip> Ord for IpVersionMarker<I>
impl<I: Ord + Ip> Ord for IpVersionMarker<I>
source§fn cmp(&self, other: &IpVersionMarker<I>) -> Ordering
fn cmp(&self, other: &IpVersionMarker<I>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<I: PartialEq + Ip> PartialEq for IpVersionMarker<I>
impl<I: PartialEq + Ip> PartialEq for IpVersionMarker<I>
source§fn eq(&self, other: &IpVersionMarker<I>) -> bool
fn eq(&self, other: &IpVersionMarker<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<I: PartialOrd + Ip> PartialOrd for IpVersionMarker<I>
impl<I: PartialOrd + Ip> PartialOrd for IpVersionMarker<I>
source§fn partial_cmp(&self, other: &IpVersionMarker<I>) -> Option<Ordering>
fn partial_cmp(&self, other: &IpVersionMarker<I>) -> Option<Ordering>
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 moreimpl<I: Copy + Ip> Copy for IpVersionMarker<I>
impl<I: Eq + Ip> Eq for IpVersionMarker<I>
impl<I: Ip> StructuralPartialEq for IpVersionMarker<I>
Auto Trait Implementations§
impl<I> Freeze for IpVersionMarker<I>
impl<I> RefUnwindSafe for IpVersionMarker<I>where
I: RefUnwindSafe,
impl<I> Send for IpVersionMarker<I>
impl<I> Sync for IpVersionMarker<I>
impl<I> Unpin for IpVersionMarker<I>where
I: Unpin,
impl<I> UnwindSafe for IpVersionMarker<I>where
I: UnwindSafe,
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)