Enum ghostfat::FileContent
source · [−]pub enum FileContent<'a, const BLOCK_SIZE: usize = 512> {
Read(&'a [u8]),
Write(&'a mut [u8]),
Dynamic(&'a mut dyn DynamicFile<BLOCK_SIZE>),
}
Expand description
Files may contain a read buffer, write buffer, or read/write trait
Variants
Read(&'a [u8])
Read only buffer
Write(&'a mut [u8])
Read/write buffer
Dynamic(&'a mut dyn DynamicFile<BLOCK_SIZE>)
Read/write object
Trait Implementations
sourceimpl<'a, const BLOCK_SIZE: usize, const N: usize> From<&'a [u8; N]> for FileContent<'a, BLOCK_SIZE>
impl<'a, const BLOCK_SIZE: usize, const N: usize> From<&'a [u8; N]> for FileContent<'a, BLOCK_SIZE>
Create a file from an immutable array
sourceimpl<'a, const BLOCK_SIZE: usize> From<&'a [u8]> for FileContent<'a, BLOCK_SIZE>
impl<'a, const BLOCK_SIZE: usize> From<&'a [u8]> for FileContent<'a, BLOCK_SIZE>
Create a file from an immutable buffer
Auto Trait Implementations
impl<'a, const BLOCK_SIZE: usize = 512> !RefUnwindSafe for FileContent<'a, BLOCK_SIZE>
impl<'a, const BLOCK_SIZE: usize> Send for FileContent<'a, BLOCK_SIZE>
impl<'a, const BLOCK_SIZE: usize> Sync for FileContent<'a, BLOCK_SIZE>
impl<'a, const BLOCK_SIZE: usize> Unpin for FileContent<'a, BLOCK_SIZE>
impl<'a, const BLOCK_SIZE: usize = 512> !UnwindSafe for FileContent<'a, BLOCK_SIZE>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more