#[repr(C)]pub struct FileSystemVolumeLabel { /* private fields */ }
Expand description
System volume label
May only be obtained on the root directory’s file handle.
Implementations
sourceimpl FileSystemVolumeLabel
impl FileSystemVolumeLabel
sourcepub fn new<'buf>(
storage: &'buf mut [u8],
volume_label: &CStr16
) -> Result<&'buf mut Self, FileInfoCreationError>
pub fn new<'buf>(
storage: &'buf mut [u8],
volume_label: &CStr16
) -> Result<&'buf mut Self, FileInfoCreationError>
Create a FileSystemVolumeLabel
structure
The structure will be created in-place within the provided storage
buffer. The buffer must be large enough to hold the data structure,
including a null-terminated UCS-2 name
string.
The buffer must be correctly aligned. You can query the required
alignment using the alignment()
method of the Align
trait that this
struct implements.
sourcepub fn volume_label(&self) -> &CStr16
pub fn volume_label(&self) -> &CStr16
Volume label
Trait Implementations
sourceimpl Align for FileSystemVolumeLabel
impl Align for FileSystemVolumeLabel
sourcefn offset_up_to_alignment(val: usize) -> usize
fn offset_up_to_alignment(val: usize) -> usize
Calculate the offset from val
necessary to make it aligned,
rounding up. For example, if val
is 1 and the alignment is 8,
this will return 7. Returns 0 if val == 0
. Read more
sourcefn round_up_to_alignment(val: usize) -> usize
fn round_up_to_alignment(val: usize) -> usize
Round val
up so that it is aligned.
sourcefn align_buf(buf: &mut [u8]) -> Option<&mut [u8]>
fn align_buf(buf: &mut [u8]) -> Option<&mut [u8]>
Get a subslice of buf
where the address of the first element
is aligned. Returns None
if no element of the buffer is
aligned. Read more
sourcefn assert_aligned(storage: &mut [u8])
fn assert_aligned(storage: &mut [u8])
Assert that some storage is correctly aligned for this type