pub struct SnapshotBuilder { /* private fields */ }Expand description
Builder for constructing Snapshot instances.
Implementations§
Source§impl SnapshotBuilder
impl SnapshotBuilder
Sourcepub fn timestamp_ms(self, ts: u64) -> Self
pub fn timestamp_ms(self, ts: u64) -> Self
Set a specific timestamp (milliseconds since Unix epoch).
Sourcepub fn module<F>(self, name: impl Into<String>, f: F) -> Self
pub fn module<F>(self, name: impl Into<String>, f: F) -> Self
Add a module with metrics built using a closure.
Sourcepub fn module_metrics(
self,
name: impl Into<String>,
metrics: ModuleMetrics,
) -> Self
pub fn module_metrics( self, name: impl Into<String>, metrics: ModuleMetrics, ) -> Self
Add a module with pre-built metrics.
Trait Implementations§
Source§impl Debug for SnapshotBuilder
impl Debug for SnapshotBuilder
Auto Trait Implementations§
impl Freeze for SnapshotBuilder
impl RefUnwindSafe for SnapshotBuilder
impl Send for SnapshotBuilder
impl Sync for SnapshotBuilder
impl Unpin for SnapshotBuilder
impl UnwindSafe for SnapshotBuilder
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