pub struct Handle { /* private fields */ }
Expand description
An opaque handler to maintain the logger’s backing task alive.
Once this object goes out of scope, the logger’s database persisting logic stops and attempts to log may fail or get stuck.
Implementations
sourceimpl Handle
impl Handle
sourcepub async fn get_log_entries(&self) -> Result<Vec<String>, String>
pub async fn get_log_entries(&self) -> Result<Vec<String>, String>
Returns the sorted list of all log entries in the database.
Given that this is exposed for testing purposes only, this just returns a flat textual
representation of the log entry and does not try to deserialize it as a LogEntry
. This
is for simplicity given that a LogEntry
keeps references to static strings and we cannot
obtain those from the database.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl !UnwindSafe for Handle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more