Struct ndisapi_rs::IfLuid
source · #[repr(transparent)]pub struct IfLuid(_);Expand description
Wrapper for the NET_LUID_LH struct from the windows crate.
This struct provides a convenient, idiomatic interface for working
with network interface Locally Unique Identifiers (LUIDs) in Rust,
including implementations of important traits like PartialEq, Eq,
PartialOrd, Ord, Debug, and Display.
Implementations§
Trait Implementations§
source§impl Debug for IfLuid
impl Debug for IfLuid
Implementation of Debug for IfLuid.
The debug representation displays the struct name and the Value field
of the inner NET_LUID_LH union.
source§impl Display for IfLuid
impl Display for IfLuid
Implementation of Display for IfLuid.
The display representation shows the struct name followed by the Value
field of the inner NET_LUID_LH union, enclosed in parentheses.
source§impl From<IfLuid> for NET_LUID_LH
impl From<IfLuid> for NET_LUID_LH
Implement the Into trait for converting an IfLuid value back into a NET_LUID_LH value.
source§impl From<NET_LUID_LH> for IfLuid
impl From<NET_LUID_LH> for IfLuid
Implement the From trait for converting a NET_LUID_LH value into an IfLuid value.
source§impl From<u64> for IfLuid
impl From<u64> for IfLuid
Implements the conversion from a u64 value to an IfLuid instance.
source§fn from(value: u64) -> Self
fn from(value: u64) -> Self
Converts a u64 value into an IfLuid instance by creating a new NET_LUID_LH structure and setting its Value field to the input value.
Arguments
value- The u64 value that should be used to set the Value field of the NET_LUID_LH structure.
Returns
- An IfLuid instance wrapping the created NET_LUID_LH structure.
Examples
use ndisapi_rs::IfLuid;
// Create two IfLuid instances using u64 values
let value1: u64 = 42;
let if_luid1 = IfLuid::from(value1);
let value2: u64 = 43;
let if_luid2 = IfLuid::from(value2);
let value3: u64 = 42;
let if_luid3 = IfLuid::from(value3);
//Compare the two IfLuid instances based on their inner NET_LUID_LH values
assert_ne!(if_luid1, if_luid2);
assert_eq!(if_luid1, if_luid3);source§impl Ord for IfLuid
impl Ord for IfLuid
Implementation of Ord for IfLuid.
This implementation provides a total ordering for IfLuid instances
based on their Value fields.
source§impl PartialEq<IfLuid> for IfLuid
impl PartialEq<IfLuid> for IfLuid
Implementation of PartialEq for IfLuid.
Two IfLuid instances are considered equal if their Value fields are equal.
source§impl PartialOrd<IfLuid> for IfLuid
impl PartialOrd<IfLuid> for IfLuid
Implementation of PartialOrd for IfLuid.
IfLuid instances are ordered based on their Value fields.
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moreimpl Copy for IfLuid
impl Eq for IfLuid
Implementation of Eq for IfLuid.
This is a marker trait that signals that IfLuid fulfills the properties
of an equivalence relation for its PartialEq implementation.