Struct nuts_directory::DirectoryBackend
source · pub struct DirectoryBackend<P: AsRef<Path>> { /* private fields */ }Trait Implementations§
source§impl<P: AsRef<Path>> Backend for DirectoryBackend<P>
impl<P: AsRef<Path>> Backend for DirectoryBackend<P>
§type Id = Id
type Id = Id
The id identifies a block in the storage. It is used everywhere you
need a pointer to a block.
source§fn block_size(&self) -> u32
fn block_size(&self) -> u32
Returns the block size of the backend.
source§fn aquire(&mut self, buf: &[u8]) -> Result<Self::Id, Error>
fn aquire(&mut self, buf: &[u8]) -> Result<Self::Id, Error>
Aquires a new block in the backend. Read more
source§fn read(&mut self, id: &Id, buf: &mut [u8]) -> Result<usize, Error>
fn read(&mut self, id: &Id, buf: &mut [u8]) -> Result<usize, Error>
Reads a block from the backend. Read more
source§fn write(&mut self, id: &Id, buf: &[u8]) -> Result<usize, Error>
fn write(&mut self, id: &Id, buf: &[u8]) -> Result<usize, Error>
Writes a block into the backend. Read more
source§impl<P: AsRef<Path>> Create<DirectoryBackend<P>> for CreateOptions<P>
impl<P: AsRef<Path>> Create<DirectoryBackend<P>> for CreateOptions<P>
source§impl<P: AsRef<Path>> Open<DirectoryBackend<P>> for OpenOptions<P>
impl<P: AsRef<Path>> Open<DirectoryBackend<P>> for OpenOptions<P>
source§impl<P: AsRef<Path>> ReceiveHeader<DirectoryBackend<P>> for DirectoryBackend<P>
impl<P: AsRef<Path>> ReceiveHeader<DirectoryBackend<P>> for DirectoryBackend<P>
source§impl<P: AsRef<Path>> ReceiveHeader<DirectoryBackend<P>> for OpenOptions<P>
impl<P: AsRef<Path>> ReceiveHeader<DirectoryBackend<P>> for OpenOptions<P>
Auto Trait Implementations§
impl<P> Freeze for DirectoryBackend<P>where
P: Freeze,
impl<P> RefUnwindSafe for DirectoryBackend<P>where
P: RefUnwindSafe,
impl<P> Send for DirectoryBackend<P>where
P: Send,
impl<P> Sync for DirectoryBackend<P>where
P: Sync,
impl<P> Unpin for DirectoryBackend<P>where
P: Unpin,
impl<P> UnwindSafe for DirectoryBackend<P>where
P: UnwindSafe,
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