pub struct TempSpillGuard<'a, S: Store> { /* private fields */ }Expand description
RAII guard that truncates the store back to base_len on drop.
Implementations§
Source§impl<'a, S: Store> TempSpillGuard<'a, S>
impl<'a, S: Store> TempSpillGuard<'a, S>
pub fn new(store: &'a mut S) -> Result<Self, DbError>
pub fn store_mut(&mut self) -> &mut S
Sourcepub fn append_temp_segment(&mut self, payload: &[u8]) -> Result<u64, DbError>
pub fn append_temp_segment(&mut self, payload: &[u8]) -> Result<u64, DbError>
Append one Temp segment and return its offset.
pub fn read_temp_payload( &mut self, offset: u64, len: u64, ) -> Result<Vec<u8>, DbError>
pub fn base_len(&self) -> u64
Trait Implementations§
Source§impl<S: Store> Drop for TempSpillGuard<'_, S>
impl<S: Store> Drop for TempSpillGuard<'_, S>
Auto Trait Implementations§
impl<'a, S> !UnwindSafe for TempSpillGuard<'a, S>
impl<'a, S> Freeze for TempSpillGuard<'a, S>
impl<'a, S> RefUnwindSafe for TempSpillGuard<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for TempSpillGuard<'a, S>where
S: Send,
impl<'a, S> Sync for TempSpillGuard<'a, S>where
S: Sync,
impl<'a, S> Unpin for TempSpillGuard<'a, S>
impl<'a, S> UnsafeUnpin for TempSpillGuard<'a, S>
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