pub struct IfLuid(/* private fields */);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
Implementation of 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
Implementation of 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
Implement the Into trait for converting an IfLuid value back into a NET_LUID_LH value.
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
Implement the From trait for converting a NET_LUID_LH value into an IfLuid value.
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
Implements the conversion from a u64 value to an IfLuid instance.
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::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
Implementation of 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 for IfLuid
Implementation of PartialEq for IfLuid.
impl PartialEq for IfLuid
Implementation of PartialEq for IfLuid.
Two IfLuid instances are considered equal if their Value fields are equal.
Source§impl PartialOrd for IfLuid
Implementation of PartialOrd for IfLuid.
impl PartialOrd for IfLuid
Implementation of PartialOrd for IfLuid.
IfLuid instances are ordered based on their Value fields.
impl 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.
Auto Trait Implementations§
impl Freeze for IfLuid
impl RefUnwindSafe for IfLuid
impl Send for IfLuid
impl Sync for IfLuid
impl Unpin for IfLuid
impl UnwindSafe for IfLuid
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)