pub struct FileLog<'a, T: Serialize + Deserialize<'a>> { /* private fields */ }Expand description
A file based transparent log
Implementations§
Trait Implementations§
Source§impl<'a, T: Serialize + DeserializeOwned> TransparentLog<'a, T> for FileLog<'a, T>
impl<'a, T: Serialize + DeserializeOwned> TransparentLog<'a, T> for FileLog<'a, T>
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<'a, T> !Freeze for FileLog<'a, T>
impl<'a, T> !RefUnwindSafe for FileLog<'a, T>
impl<'a, T> Send for FileLog<'a, T>where
T: Send,
impl<'a, T> !Sync for FileLog<'a, T>
impl<'a, T> Unpin for FileLog<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for FileLog<'a, 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