pub struct LiveSystemProvider { /* private fields */ }Expand description
Provides an implementation of FileProvider that enumerates the
required files at the correct paths on a live macOS system. These files are only present on
macOS Sierra (10.12) and above. The implemented methods emit error log messages if any are
encountered while enumerating files or creating readers, but are otherwise infallible.
§Example
use macos_unifiedlogs::filesystem::LiveSystemProvider;
let provider = LiveSystemProvider::default();Implementations§
Trait Implementations§
Source§impl Debug for LiveSystemProvider
impl Debug for LiveSystemProvider
Source§impl Default for LiveSystemProvider
impl Default for LiveSystemProvider
Source§fn default() -> LiveSystemProvider
fn default() -> LiveSystemProvider
Returns the “default value” for a type. Read more
Source§impl FileProvider for LiveSystemProvider
impl FileProvider for LiveSystemProvider
Source§fn tracev3_files(&self) -> Box<dyn Iterator<Item = Box<dyn SourceFile>>>
fn tracev3_files(&self) -> Box<dyn Iterator<Item = Box<dyn SourceFile>>>
Provides an iterator of
.tracev3 files from the
/private/var/db/diagnostics/((HighVolume|Signpost|Trace|Special)/, plus the
livedata.LogData.tracev3 file if it was collected via log collect.Source§fn uuidtext_files(&self) -> Box<dyn Iterator<Item = Box<dyn SourceFile>>>
fn uuidtext_files(&self) -> Box<dyn Iterator<Item = Box<dyn SourceFile>>>
Provides an iterator of
UUIDText string files from the /var/db/uuidtext/XX/ directories,
where the XX is any two uppercase hex characters, along with the filename (i.e., the
filename from the source file. This should be a 30-character name containing only hex
digits. This should be a 30-character name containing only hex digits. It is important that
this is. accurate, or else strings will not be able to be referenced from the source file.Source§fn read_uuidtext(&self, uuid: &str) -> Result<UUIDText, Error>
fn read_uuidtext(&self, uuid: &str) -> Result<UUIDText, Error>
Reads a provided UUID file at runtime.
The UUID is obtaind by parsing the
tracev3 files. Reads will fail if the UUID does not exist
This avoids having to read all UUIDText files into memory.Source§fn cached_uuidtext(&self, uuid: &str) -> Option<&UUIDText>
fn cached_uuidtext(&self, uuid: &str) -> Option<&UUIDText>
Check our cached
UUIDText data for stringsSource§fn update_uuid(&mut self, uuid: &str, uuid2: &str)
fn update_uuid(&mut self, uuid: &str, uuid2: &str)
Update our cached
UUIDText dataSource§fn update_dsc(&mut self, uuid: &str, uuid2: &str)
fn update_dsc(&mut self, uuid: &str, uuid2: &str)
Update our cached
SharedCacheStrings dataSource§fn cached_dsc(&self, uuid: &str) -> Option<&SharedCacheStrings>
fn cached_dsc(&self, uuid: &str) -> Option<&SharedCacheStrings>
Check our cached
SharedCacheStrings for stringsSource§fn read_dsc_uuid(&self, uuid: &str) -> Result<SharedCacheStrings, Error>
fn read_dsc_uuid(&self, uuid: &str) -> Result<SharedCacheStrings, Error>
Reads a provided UUID file at runtime.
The UUID is obtaind by parsing the
tracev3 files. Reads will fail if the UUID does not exist
This avoids having to read all SharedCacheStrings files into memory.Source§fn dsc_files(&self) -> Box<dyn Iterator<Item = Box<dyn SourceFile>>>
fn dsc_files(&self) -> Box<dyn Iterator<Item = Box<dyn SourceFile>>>
Provides an iterator of shared string files from the
/var/db/uuidtext/dsc subdirectory,
along with the filename (i.e., the filename from the source file). This should be a
30-character name containing only hex digits. It is important that this is. accurate, or
else strings will not be able to be referenced from the source file.Source§fn timesync_files(&self) -> Box<dyn Iterator<Item = Box<dyn SourceFile>>>
fn timesync_files(&self) -> Box<dyn Iterator<Item = Box<dyn SourceFile>>>
Provides an iterator of
.timesync files from the /var/db/diagnostics/timesync subdirectory.Auto Trait Implementations§
impl Freeze for LiveSystemProvider
impl RefUnwindSafe for LiveSystemProvider
impl Send for LiveSystemProvider
impl Sync for LiveSystemProvider
impl Unpin for LiveSystemProvider
impl UnwindSafe for LiveSystemProvider
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