pub struct ValueLog<I, A, C = Crc32> { /* private fields */ }Expand description
The value log implementation.
Trait Implementations§
Source§impl<T, I, A, C> From<ValueLog<I, A, C>> for GenericValueLog<T, I, A, C>
impl<T, I, A, C> From<ValueLog<I, A, C>> for GenericValueLog<T, I, A, C>
Source§impl<I, A, C> Log for ValueLog<I, A, C>where
A: Allocator,
C: BuildChecksumer,
impl<I, A, C> Log for ValueLog<I, A, C>where
A: Allocator,
C: BuildChecksumer,
Source§fn magic_version(&self) -> u16
fn magic_version(&self) -> u16
Returns the magic version of the log. Read more
Source§fn data_offset(&self) -> usize
fn data_offset(&self) -> usize
Returns the data offset of the log. Read more
Source§fn path(&self) -> Option<&<Self::Allocator as Allocator>::Path>
fn path(&self) -> Option<&<Self::Allocator as Allocator>::Path>
Available on crate feature
memmap and non-target_family="wasm" only.Returns the path of the log. Read more
Source§fn is_map(&self) -> bool
fn is_map(&self) -> bool
Available on crate feature
memmap and non-target_family="wasm" only.Returns
true if the log is using a memory map backend. Read moreSource§fn lock_exclusive(&self) -> Result<()>
fn lock_exclusive(&self) -> Result<()>
Available on crate feature
memmap and non-target_family="wasm" only.Locks the underlying file for exclusive access, only works on mmap with a file backend. Read more
Available on crate feature
memmap and non-target_family="wasm" only.Locks the underlying file for shared access, only works on mmap with a file backend. Read more
Source§fn unlock(&self) -> Result<()>
fn unlock(&self) -> Result<()>
Available on crate feature
memmap and non-target_family="wasm" only.Unlocks the underlying file, only works on mmap with a file backend. Read more
Source§impl<I, A, C> LogWriter for ValueLog<I, A, C>
impl<I, A, C> LogWriter for ValueLog<I, A, C>
impl<I, A, C> Mutable for ValueLog<I, A, C>
Auto Trait Implementations§
impl<I, A, C> Freeze for ValueLog<I, A, C>
impl<I, A, C> RefUnwindSafe for ValueLog<I, A, C>
impl<I, A, C> Send for ValueLog<I, A, C>
impl<I, A, C> Sync for ValueLog<I, A, C>
impl<I, A, C> Unpin for ValueLog<I, A, C>
impl<I, A, C> UnwindSafe for ValueLog<I, A, C>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<L> LogReaderExt for Lwhere
L: LogReader,
impl<L> LogReaderExt for Lwhere
L: LogReader,
Source§impl<L> LogWriterExt for Lwhere
L: LogWriter,
impl<L> LogWriterExt for Lwhere
L: LogWriter,
Source§fn insert_generic<T>(
&self,
value: &T,
) -> Result<ValuePointer<Self::Id>, Either<T::Error, Error>>
fn insert_generic<T>( &self, value: &T, ) -> Result<ValuePointer<Self::Id>, Either<T::Error, Error>>
Inserts a generic value into the log. Read more
Source§fn insert_with<E>(
&self,
vb: ValueBuilder<impl FnOnce(&mut VacantBuffer<'_>) -> Result<(), E>>,
) -> Result<ValuePointer<Self::Id>, Either<E, Error>>
fn insert_with<E>( &self, vb: ValueBuilder<impl FnOnce(&mut VacantBuffer<'_>) -> Result<(), E>>, ) -> Result<ValuePointer<Self::Id>, Either<E, Error>>
Inserts a value into the log with a builder, the value is built in place. Read more
Source§fn insert_generic_tombstone<T>(
&self,
value: &T,
) -> Result<ValuePointer<Self::Id>, Either<T::Error, Error>>
fn insert_generic_tombstone<T>( &self, value: &T, ) -> Result<ValuePointer<Self::Id>, Either<T::Error, Error>>
Inserts a generic value into the log. Read more
Source§fn insert_tombstone_with<E>(
&self,
vb: ValueBuilder<impl FnOnce(&mut VacantBuffer<'_>) -> Result<(), E>>,
) -> Result<ValuePointer<Self::Id>, Either<E, Error>>
fn insert_tombstone_with<E>( &self, vb: ValueBuilder<impl FnOnce(&mut VacantBuffer<'_>) -> Result<(), E>>, ) -> Result<ValuePointer<Self::Id>, Either<E, Error>>
Inserts a value into the log with a builder, the value is built in place. Read more
Source§impl<L> MutableLog for L
impl<L> MutableLog for L
Source§unsafe fn reserved_slice_mut(&self) -> &mut [u8] ⓘ
unsafe fn reserved_slice_mut(&self) -> &mut [u8] ⓘ
Returns the mutable reference to the reserved slice. Read more
Source§fn flush(&self) -> Result<()>
fn flush(&self) -> Result<()>
Available on crate feature
memmap and non-target_family="wasm" only.Flushes the memory-mapped file to disk. Read more
Source§fn flush_async(&self) -> Result<()>
fn flush_async(&self) -> Result<()>
Available on crate feature
memmap and non-target_family="wasm" only.Flushes the memory-mapped file to disk asynchronously. Read more