Struct Guid
pub struct Guid<'a> { /* private fields */ }Expand description
‘#GUID’ is a heap, which contains a sequence of 128-bit GUIDs
The Guid object provides helper methods to access the data within this blob, and parse / process it
properly according to the standard.
§Examples
use dotscope::metadata::streams::Guid;
let data = &[0u8; 32];
let guid_heap = Guid::from(data).unwrap();
// Accessing GUIDs would require valid data and index§Reference
Implementations§
§impl<'a> Guid<'a>
impl<'a> Guid<'a>
pub fn iter(&self) -> GuidIterator<'_> ⓘ
pub fn iter(&self) -> GuidIterator<'_> ⓘ
Returns an iterator over all GUIDs in the heap
Provides access to all 16-byte GUID entries in sequential order.
Each iteration yields a Result<(usize, uguid::Guid)> with the index and GUID value.
§Examples
use dotscope::metadata::streams::Guid;
let data = &[0u8; 32]; // Two empty GUIDs
let guids = Guid::from(data).unwrap();
for result in guids.iter() {
match result {
Ok((index, guid)) => println!("GUID {}: {}", index, guid),
Err(e) => eprintln!("Error: {}", e),
}
}Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Guid<'a>
impl<'a> RefUnwindSafe for Guid<'a>
impl<'a> Send for Guid<'a>
impl<'a> Sync for Guid<'a>
impl<'a> Unpin for Guid<'a>
impl<'a> UnwindSafe for Guid<'a>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more