pub struct LfnBuffer<'a> { /* private fields */ }
Expand description
Used to store a Long File Name
Implementations§
Source§impl<'a> LfnBuffer<'a>
impl<'a> LfnBuffer<'a>
Sourcepub fn new(storage: &'a mut [u8]) -> LfnBuffer<'a>
pub fn new(storage: &'a mut [u8]) -> LfnBuffer<'a>
Create a new, empty, LFN Buffer using the given mutable slice as its storage.
Sourcepub fn push(&mut self, buffer: &[u16; 13])
pub fn push(&mut self, buffer: &[u16; 13])
Push the 13 UTF-16 codepoints into this string.
We assume they are pushed last-chunk-first, as you would find them on disk.
Any chunk starting with a half of a surrogate pair has that saved for the next call.
[de00, 002e, 0074, 0078, 0074, 0000, ffff, ffff, ffff, ffff, ffff, ffff, ffff]
[0041, 0042, 0030, 0031, 0032, 0033, 0034, 0035, 0036, 0037, 0038, 0039, d83d]
Would map to
0041 0042 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 1f600 002e 0074 0078 0074, or
"AB0123456789😀.txt"
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for LfnBuffer<'a>
impl<'a> RefUnwindSafe for LfnBuffer<'a>
impl<'a> Send for LfnBuffer<'a>
impl<'a> Sync for LfnBuffer<'a>
impl<'a> Unpin for LfnBuffer<'a>
impl<'a> !UnwindSafe for LfnBuffer<'a>
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