Struct VolumeName
pub struct VolumeName {
len: u8,
bytes: [u8; 127],
}Expand description
Name of a UBI volume.
The kernel allows 1 to 127 bytes without a NUL byte. They don’t have to
be UTF-8. Display shows invalid UTF-8 as U+FFFD.
Fields§
§len: u8§bytes: [u8; 127]Implementations§
§impl VolumeName
impl VolumeName
pub fn new(name: &[u8]) -> Result<Self, VolumeNameError>
pub fn new(name: &[u8]) -> Result<Self, VolumeNameError>
Returns the name name.
§Errors
Returns an error if name is empty, longer than VolumeName::MAX_LEN
or contains a NUL byte.
Trait Implementations§
§impl AsRef<[u8]> for VolumeName
impl AsRef<[u8]> for VolumeName
§impl Clone for VolumeName
impl Clone for VolumeName
§fn clone(&self) -> VolumeName
fn clone(&self) -> VolumeName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VolumeName
§impl Debug for VolumeName
impl Debug for VolumeName
§impl Display for VolumeName
impl Display for VolumeName
impl Eq for VolumeName
§impl FromStr for VolumeName
impl FromStr for VolumeName
§impl Hash for VolumeName
impl Hash for VolumeName
§impl PartialEq for VolumeName
impl PartialEq for VolumeName
§impl PartialEq<[u8]> for VolumeName
impl PartialEq<[u8]> for VolumeName
§impl PartialEq<str> for VolumeName
impl PartialEq<str> for VolumeName
impl StructuralPartialEq for VolumeName
§impl TryFrom<&[u8]> for VolumeName
impl TryFrom<&[u8]> for VolumeName
Auto Trait Implementations§
impl Freeze for VolumeName
impl RefUnwindSafe for VolumeName
impl Send for VolumeName
impl Sync for VolumeName
impl Unpin for VolumeName
impl UnsafeUnpin for VolumeName
impl UnwindSafe for VolumeName
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