pub struct InMemoryLog<T> { /* private fields */ }Expand description
An in-memory transparent log
Trait Implementations§
Source§impl<T: Debug> Debug for InMemoryLog<T>
impl<T: Debug> Debug for InMemoryLog<T>
Source§impl<T> Default for InMemoryLog<T>
Default implementation for an empty in-memory log
impl<T> Default for InMemoryLog<T>
Default implementation for an empty in-memory log
Source§impl<'a, T: Serialize + Deserialize<'a>> TransparentLog<'a, T> for InMemoryLog<T>
TransparentLog Trait implementation for in-memory log
impl<'a, T: Serialize + Deserialize<'a>> TransparentLog<'a, T> for InMemoryLog<T>
TransparentLog Trait implementation for in-memory log
Source§fn get(&self, index: Self::LogSize) -> Result<Option<MaybeOwned<'_, T>>>
fn get(&self, index: Self::LogSize) -> Result<Option<MaybeOwned<'_, T>>>
Retrieve a log entry by its index
Source§fn add_hash(&mut self, level: LogHeight, hash: String) -> Result<Self::LogSize>
fn add_hash(&mut self, level: LogHeight, hash: String) -> Result<Self::LogSize>
Add a hash and index, returns the index of the added hash
Source§fn get_hash(
&self,
level: LogHeight,
index: Self::LogSize,
) -> Result<MaybeOwned<'_, String>>
fn get_hash( &self, level: LogHeight, index: Self::LogSize, ) -> Result<MaybeOwned<'_, String>>
Get a hash at the given level and index
Source§fn append(&mut self, record: T) -> Result<Record<Self::LogSize>>
fn append(&mut self, record: T) -> Result<Record<Self::LogSize>>
Append a new record to the log and return its index
Auto Trait Implementations§
impl<T> Freeze for InMemoryLog<T>
impl<T> RefUnwindSafe for InMemoryLog<T>where
T: RefUnwindSafe,
impl<T> Send for InMemoryLog<T>where
T: Send,
impl<T> Sync for InMemoryLog<T>where
T: Sync,
impl<T> Unpin for InMemoryLog<T>where
T: Unpin,
impl<T> UnwindSafe for InMemoryLog<T>where
T: 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