Struct optee_teec::Uuid
source · pub struct Uuid { /* private fields */ }
Expand description
A Universally Unique Resource Identifier (UUID) type as defined in RFC4122. The value is used to identify a trusted application.
Implementations§
source§impl Uuid
impl Uuid
sourcepub fn parse_str(input: &str) -> Result<Uuid, ParseError>
pub fn parse_str(input: &str) -> Result<Uuid, ParseError>
Parses a Uuid from a string of hexadecimal digits with optional hyphens.
§Examples
let uuid = Uuid::parse_str("8abcf200-2450-11e4-abe2-0002a5d5c51b").unwrap();
sourcepub fn from_bytes(bytes: [u8; 16]) -> Uuid
pub fn from_bytes(bytes: [u8; 16]) -> Uuid
Creates a Uuid
using the supplied big-endian bytes.
§Examples
let bytes: [u8; 16] = [70, 235, 208, 238, 14, 109, 67, 201, 185, 13, 204, 195, 90, 145, 63, 62,];
let uuid = Uuid::from_bytes(bytes);
sourcepub fn from_slice(b: &[u8]) -> Result<Uuid, BytesError>
pub fn from_slice(b: &[u8]) -> Result<Uuid, BytesError>
Creates a Uuid
using a slice of supplied big-endian bytes.
§Examples
let bytes: &[u8; 16] = &[70, 235, 208, 238, 14, 109, 67, 201, 185, 13, 204, 195, 90, 145, 63, 62,];
let uuid = Uuid::from_slice(bytes);
sourcepub fn new_raw(
time_low: u32,
time_mid: u16,
time_hi_and_version: u16,
clock_seq_and_nod: [u8; 8]
) -> Uuid
pub fn new_raw( time_low: u32, time_mid: u16, time_hi_and_version: u16, clock_seq_and_nod: [u8; 8] ) -> Uuid
Crates a raw TEE client uuid object with specified parameters.
sourcepub fn as_raw_ptr(&self) -> *const TEEC_UUID
pub fn as_raw_ptr(&self) -> *const TEEC_UUID
Converts a uuid to a const raw TEEC_UUID
pointer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Uuid
impl RefUnwindSafe for Uuid
impl Send for Uuid
impl Sync for Uuid
impl Unpin for Uuid
impl UnwindSafe for Uuid
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