pub struct Guid { /* private fields */ }
Expand description
A Global unique identifier for ibv.
This struct acts as a rust wrapper for GUID value represented as __be64
in
libibverbs. We introduce this struct, because u64 is stored in host
endianness, whereas ibverbs stores GUID in network order (big endian).
Implementations§
source§impl Guid
impl Guid
sourcepub fn oui(&self) -> u32
pub fn oui(&self) -> u32
Upper 24 bits of the GUID are OUI (Organizationally Unique Identifier, http://standards-oui.ieee.org/oui/oui.txt). The function returns OUI as a 24-bit number inside a u32.
sourcepub fn is_reserved(&self) -> bool
pub fn is_reserved(&self) -> bool
Returns true
if this GUID is all zeroes, which is considered reserved.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Guid
impl<'de> Deserialize<'de> for Guid
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Guid
impl PartialEq for Guid
impl Copy for Guid
impl Eq for Guid
impl StructuralPartialEq for Guid
Auto Trait Implementations§
impl RefUnwindSafe for Guid
impl Send for Guid
impl Sync for Guid
impl Unpin for Guid
impl UnwindSafe for Guid
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