pub struct Log { /* private fields */ }Implementations§
Source§impl Log
impl Log
Sourcepub fn open_default() -> Result<(Log, Utf8PathBuf)>
pub fn open_default() -> Result<(Log, Utf8PathBuf)>
Opens the default user-scope log.
Only use this as a result of user interaction.
The default log is shared among everything the user does, so it would get spammed easily if automated processes write to it.
pub fn new<P: AsRef<Path>>(p: P) -> Result<Self>
pub fn clear(&self) -> Result<()>
pub fn get_by_index(&self, index: i64) -> Result<Option<Element>>
pub fn iter<'a>(&'a self) -> Result<LogCursor<'a>>
Sourcepub fn push_with_time<S: AsRef<str>>(
&self,
ts: SystemTime,
value: S,
) -> Result<i64>
pub fn push_with_time<S: AsRef<str>>( &self, ts: SystemTime, value: S, ) -> Result<i64>
Insert with user-specified time in case the user does store their local time inside the line.
pub fn push<S: AsRef<str>>(&self, value: S) -> Result<i64>
Auto Trait Implementations§
impl !RefUnwindSafe for Log
impl !Send for Log
impl !Sync for Log
impl !UnwindSafe for Log
impl Freeze for Log
impl Unpin for Log
impl UnsafeUnpin for Log
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