#[repr(transparent)]pub struct GptPartitionName(pub [u8; 72]);Expand description
Human readable partition label encoded as a null-terminated UCS-2 string.
§Examples
Construct from a UTF-8 string:
use gpt_disk_types::GptPartitionName;
let partition_name: GptPartitionName = "hacktheplanet".parse().unwrap();Tuple Fields§
§0: [u8; 72]Implementations§
Source§impl GptPartitionName
impl GptPartitionName
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
True if the first character is a null terminator, false otherwise.
Sourcepub fn chars(&self) -> impl Iterator<Item = char> + '_
pub fn chars(&self) -> impl Iterator<Item = char> + '_
Get an iterator over the characters in the partition name, using
UCS-2 decoding. Iteration ends when either the end of the array
or a null terminator is reached. The null character is not
included in the iteration output. Any invalid characters are
replaced with the Unicode replacement character (�).
Trait Implementations§
Source§impl Clone for GptPartitionName
impl Clone for GptPartitionName
Source§fn clone(&self) -> GptPartitionName
fn clone(&self) -> GptPartitionName
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GptPartitionName
impl Debug for GptPartitionName
Source§impl Default for GptPartitionName
impl Default for GptPartitionName
Source§impl Display for GptPartitionName
impl Display for GptPartitionName
Source§impl FromStr for GptPartitionName
impl FromStr for GptPartitionName
Source§impl Hash for GptPartitionName
impl Hash for GptPartitionName
Source§impl Ord for GptPartitionName
impl Ord for GptPartitionName
Source§fn cmp(&self, other: &GptPartitionName) -> Ordering
fn cmp(&self, other: &GptPartitionName) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GptPartitionName
impl PartialEq for GptPartitionName
Source§impl PartialOrd for GptPartitionName
impl PartialOrd for GptPartitionName
Source§impl Zeroable for GptPartitionName
Available on crate feature bytemuck only.
impl Zeroable for GptPartitionName
Available on crate feature
bytemuck only.impl Copy for GptPartitionName
impl Eq for GptPartitionName
impl Pod for GptPartitionName
Available on crate feature
bytemuck only.impl StructuralPartialEq for GptPartitionName
Auto Trait Implementations§
impl Freeze for GptPartitionName
impl RefUnwindSafe for GptPartitionName
impl Send for GptPartitionName
impl Sync for GptPartitionName
impl Unpin for GptPartitionName
impl UnwindSafe for GptPartitionName
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.