pub struct EventBuilder<'a> { /* private fields */ }
Implementations§
Source§impl<'a> EventBuilder<'a>
impl<'a> EventBuilder<'a>
pub fn action(self, action_id: impl Into<String>) -> Self
Sourcepub fn action_id(self, aid: impl Into<String>) -> Self
pub fn action_id(self, aid: impl Into<String>) -> Self
Thin wrapper for .action(...)
to improve readability at call sites.
pub fn path(self, path: impl Into<String>) -> Self
Sourcepub fn perf(self, hash_ms: u64, backup_ms: u64, swap_ms: u64) -> Self
pub fn perf(self, hash_ms: u64, backup_ms: u64, swap_ms: u64) -> Self
Attach a nested perf object with hash/backup/swap timings in milliseconds.
Sourcepub fn error_id(self, id: ErrorId) -> Self
pub fn error_id(self, id: ErrorId) -> Self
Set a stable error identifier as defined in crate::api::errors
.
Sourcepub fn exit_code_for(self, id: ErrorId) -> Self
pub fn exit_code_for(self, id: ErrorId) -> Self
Set an exit code derived from the given error id.
pub fn field(self, key: &str, value: Value) -> Self
pub fn merge(self, extra: &Value) -> Self
pub fn emit(self, decision: Decision)
pub fn emit_success(self)
pub fn emit_failure(self)
pub fn emit_warn(self)
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for EventBuilder<'a>
impl<'a> !RefUnwindSafe for EventBuilder<'a>
impl<'a> !Send for EventBuilder<'a>
impl<'a> !Sync for EventBuilder<'a>
impl<'a> Unpin for EventBuilder<'a>
impl<'a> !UnwindSafe for EventBuilder<'a>
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