[][src]Struct winstructs::guid::Guid

pub struct Guid { /* fields omitted */ }

https://docs.microsoft.com/en-us/previous-versions/aa373931(v%3Dvs.80)

Example

let raw_guid: &[u8] = &[0x25, 0x96, 0x84, 0x54, 0x78, 0x54, 0x94, 0x49,
                        0xa5, 0xba, 0x3e, 0x3b, 0x3, 0x28, 0xc3, 0xd];

let guid = Guid::from_buffer(raw_guid).unwrap();

assert_eq!(format!("{}", guid), "54849625-5478-4994-A5BA-3E3B0328C30D");

Methods

impl Guid[src]

pub fn new(data1: u32, data2: u16, data3: u16, data4: [u8; 8]) -> Guid[src]

Creates a new GUID directly from it's components.

pub fn from_buffer(buffer: &[u8]) -> Result<Guid>[src]

Reads a GUID from a buffer.

pub fn from_stream<T: Read>(stream: &mut T) -> Result<Guid>[src]

Deprecated:

use from_reader

pub fn from_reader<T: Read>(stream: &mut T) -> Result<Guid>[src]

Reads a GUID from a Read instance.

Trait Implementations

impl Clone for Guid[src]

impl Debug for Guid[src]

impl Display for Guid[src]

impl PartialEq<Guid> for Guid[src]

impl PartialOrd<Guid> for Guid[src]

impl Serialize for Guid[src]

For GUIDs, a string representation is preferable to a struct for serialization.

impl StructuralPartialEq for Guid[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.