pub struct OSLogStore { /* private fields */ }Expand description
Safe wrapper around OSLogStore.
Implementations§
Source§impl OSLogStore
impl OSLogStore
Sourcepub fn new(scope: OSLogStoreScope) -> Result<Self, LogError>
pub fn new(scope: OSLogStoreScope) -> Result<Self, LogError>
Sourcepub fn from_url(path: impl AsRef<Path>) -> Result<Self, LogError>
pub fn from_url(path: impl AsRef<Path>) -> Result<Self, LogError>
Opens a logarchive URL.
§Errors
Returns an error if the path contains a NUL byte or the store cannot be opened.
pub fn position_at(&self, time: SystemTime) -> OSLogPosition
pub fn position_time_interval_since_end( &self, duration: Duration, ) -> OSLogPosition
pub fn position_time_interval_since_latest_boot( &self, duration: Duration, ) -> OSLogPosition
Sourcepub fn get_entries(
&self,
options: OSLogEnumeratorOptions,
position: Option<&OSLogPosition>,
predicate: Option<&str>,
) -> Result<Vec<OSLogStoreEntry>, LogError>
pub fn get_entries( &self, options: OSLogEnumeratorOptions, position: Option<&OSLogPosition>, predicate: Option<&str>, ) -> Result<Vec<OSLogStoreEntry>, LogError>
Enumerates entries from the store.
§Errors
Returns an error if the predicate contains a NUL byte or the store enumeration fails.
Sourcepub fn entries(
&self,
options: OSLogEnumeratorOptions,
position: Option<&OSLogPosition>,
predicate: Option<&str>,
) -> Result<Vec<OSLogStoreEntry>, LogError>
pub fn entries( &self, options: OSLogEnumeratorOptions, position: Option<&OSLogPosition>, predicate: Option<&str>, ) -> Result<Vec<OSLogStoreEntry>, LogError>
Trait Implementations§
Source§impl Drop for OSLogStore
impl Drop for OSLogStore
Auto Trait Implementations§
impl Freeze for OSLogStore
impl RefUnwindSafe for OSLogStore
impl !Send for OSLogStore
impl !Sync for OSLogStore
impl Unpin for OSLogStore
impl UnsafeUnpin for OSLogStore
impl UnwindSafe for OSLogStore
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