Struct uefi::CStr8

source · []
#[repr(transparent)]
pub struct CStr8(_);
Expand description

A Latin-1 null-terminated string

This type is largely inspired by std::ffi::CStr, see the documentation of CStr for more details on its semantics.

Implementations

Wraps a raw UEFI string with a safe C string wrapper

Safety

The function will start accessing memory from ptr until the first null byte. It’s the callers responsability to ensure ptr points to a valid string, in accessible memory.

Creates a C string wrapper from bytes

Unsafely creates a C string wrapper from bytes

Safety

It’s the callers responsability to ensure chars is a valid Latin-1 null-terminated string, with no interior null bytes.

Returns the inner pointer to this C string

Converts this C string to a slice of bytes

Converts this C string to a slice of bytes containing the trailing 0 char

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more