pub struct TraceStore { /* private fields */ }Expand description
Process-wide style store held on crate::desktop::Widget / mobile.
Implementations§
Source§impl TraceStore
impl TraceStore
Sourcepub fn push(&self, event: TraceEvent)
pub fn push(&self, event: TraceEvent)
Append an event when tracing is enabled.
Sourcepub fn list_since(&self, since_ms: Option<u64>) -> Vec<TraceEntry>
pub fn list_since(&self, since_ms: Option<u64>) -> Vec<TraceEntry>
Events with ts >= since_ms (or all when None).
Sourcepub fn flush_to_path(&self, path: &Path) -> Result<()>
pub fn flush_to_path(&self, path: &Path) -> Result<()>
Write the ring to disk if dirty.
Sourcepub fn load_from_path(&self, path: &Path)
pub fn load_from_path(&self, path: &Path)
Replace the ring from a previous flush (best-effort).
Sourcepub fn needs_timed_flush(&self) -> bool
pub fn needs_timed_flush(&self) -> bool
true when dirty and the flush interval has elapsed.
Trait Implementations§
Source§impl Default for TraceStore
impl Default for TraceStore
Source§fn default() -> TraceStore
fn default() -> TraceStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for TraceStore
impl RefUnwindSafe for TraceStore
impl Send for TraceStore
impl Sync for TraceStore
impl Unpin for TraceStore
impl UnsafeUnpin for TraceStore
impl UnwindSafe for TraceStore
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