[−][src]Struct sunrise_fs::interface::storage::FileStorage
Wrapper around a FileOperations exposing a StorageDevice interface.
Implementations
impl<F: FileOperations> FileStorage<F>
[src]
pub fn new(f: F) -> FileStorage<F>
[src]
Creates a new StorageDevice from the given FileOperations.
Trait Implementations
impl<F: Debug + FileOperations> Debug for FileStorage<F>
[src]
impl<F: FileOperations> IStorage for FileStorage<F>
[src]
fn set_size(&mut self, new_size: u64) -> LibUserResult<()>
[src]
Set the total size of the storage in bytes.
impl<F: FileOperations> StorageDevice for FileStorage<F>
[src]
type Error = Error
Error type returned by this block device when an operation fails
fn read(&mut self, offset: u64, buf: &mut [u8]) -> LibUserResult<()>
[src]
Read the data at the given offset
in the storage into a given buffer.
fn write(&mut self, offset: u64, buf: &[u8]) -> LibUserResult<()>
[src]
Write the data from the given buffer at the given offset
in the storage.
fn flush(&mut self) -> LibUserResult<()>
[src]
Writes every dirty data to the storage.
fn len(&mut self) -> Result<u64, Error>
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for FileStorage<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for FileStorage<F>
impl<F> Sync for FileStorage<F>
impl<F> Unpin for FileStorage<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for FileStorage<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SizedIPCBuffer for T
[src]
fn size(&self) -> usize
[src]
fn is_cool(addr: usize, size: usize) -> bool
[src]
unsafe fn from_raw_parts<'a>(addr: usize, _size: usize) -> &'a T
[src]
unsafe fn from_raw_parts_mut<'a>(addr: usize, _size: usize) -> &'a mut T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,