Struct rustdb::buf::ReadBufStg
source · pub struct ReadBufStg<const N: usize> { /* private fields */ }Expand description
ReadBufStg buffers small (up to limit) reads to the underlying storage. Only supported functions are read and reset.
See implementation of AtomicFile for how this is used in conjunction with WMap.
N is buffer size.
Implementations§
Trait Implementations§
source§impl<const N: usize> Storage for ReadBufStg<N>
impl<const N: usize> Storage for ReadBufStg<N>
source§fn size(&self) -> u64
fn size(&self) -> u64
Get the size of the underlying storage.
Note : this is valid initially and after a commit but is not defined after write is called.
source§fn commit(&mut self, _size: u64)
fn commit(&mut self, _size: u64)
Finish write transaction, size is new size of underlying storage.
source§fn write_data(&mut self, start: u64, data: Data, off: usize, len: usize)
fn write_data(&mut self, start: u64, data: Data, off: usize, len: usize)
Write Data slice to storage.
fn clone(&self) -> Box<dyn Storage>
source§fn wait_complete(&self)
fn wait_complete(&self)
Wait until current writes are complete.
Auto Trait Implementations§
impl<const N: usize> !RefUnwindSafe for ReadBufStg<N>
impl<const N: usize> Send for ReadBufStg<N>
impl<const N: usize> Sync for ReadBufStg<N>
impl<const N: usize> Unpin for ReadBufStg<N>
impl<const N: usize> !UnwindSafe for ReadBufStg<N>
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