pub struct CompletionEvent {
pub tool: String,
pub status: String,
pub command: Vec<String>,
pub cwd: String,
pub started_at: String,
pub finished_at: String,
pub duration_ms: u128,
pub exit_code: i32,
pub host: String,
}Expand description
Serialized payload sent to webhook/custom channels.
Fields§
§tool: StringConstant tool identifier.
status: Stringsuccess when exit code is 0, otherwise failure.
command: Vec<String>Command argv.
cwd: StringWorking directory where brb was invoked.
started_at: StringUTC start timestamp (RFC3339).
finished_at: StringUTC finish timestamp (RFC3339).
duration_ms: u128Total duration in milliseconds.
exit_code: i32Wrapped command exit code.
host: StringHostname when available.
Implementations§
Source§impl CompletionEvent
impl CompletionEvent
Sourcepub fn from_run(run: &RunResult) -> Self
pub fn from_run(run: &RunResult) -> Self
Builds a completion event from a finished wrapped command.
Sourcepub fn test_event() -> Self
pub fn test_event() -> Self
Creates a synthetic event used by brb channels test.
Trait Implementations§
Source§impl Clone for CompletionEvent
impl Clone for CompletionEvent
Source§fn clone(&self) -> CompletionEvent
fn clone(&self) -> CompletionEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompletionEvent
impl Debug for CompletionEvent
Auto Trait Implementations§
impl Freeze for CompletionEvent
impl RefUnwindSafe for CompletionEvent
impl Send for CompletionEvent
impl Sync for CompletionEvent
impl Unpin for CompletionEvent
impl UnsafeUnpin for CompletionEvent
impl UnwindSafe for CompletionEvent
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