pub struct VolumeName { /* private fields */ }
Expand description
An MS-DOS 11 character volume label.
ISO-8859-1 encoding is assumed. Trailing spaces are trimmed. Reserved characters are not allowed. There is no file extension, unlike with a filename.
Volume labels can be found in the BIOS Parameter Block, and in a root directory entry with the ‘Volume Label’ bit set. Both places should have the same contents, but they can get out of sync.
MS-DOS FDISK would show you the one in the BPB, but DIR would show you the one in the root directory.
Implementations§
Source§impl VolumeName
impl VolumeName
Sourcepub fn create_from_str(name: &str) -> Result<VolumeName, FilenameError>
pub fn create_from_str(name: &str) -> Result<VolumeName, FilenameError>
Create a new MS-DOS volume label.
Sourcepub unsafe fn to_short_filename(self) -> ShortFileName
pub unsafe fn to_short_filename(self) -> ShortFileName
Convert to a Short File Name
§Safety
Volume Labels can contain things that Short File Names cannot, so only do this conversion if you are creating the name of a directory entry with the ‘Volume Label’ attribute.
Trait Implementations§
Source§impl Clone for VolumeName
impl Clone for VolumeName
Source§fn clone(&self) -> VolumeName
fn clone(&self) -> VolumeName
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 VolumeName
impl Debug for VolumeName
Source§impl Display for VolumeName
impl Display for VolumeName
Source§impl PartialEq for VolumeName
impl PartialEq for VolumeName
impl Eq for VolumeName
impl StructuralPartialEq 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 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