pub struct AuditRecord<'record> {
pub time_millis: u128,
pub process: u32,
pub parent: u32,
pub form: GuardedCommand,
pub outcome: AuditOutcome,
pub place: &'record (PathBuf, &'static str),
pub directory: &'record Path,
pub arguments: &'record [OsString],
pub dirty: Option<bool>,
}Expand description
What:
Everything one record states.
A struct is a record with named fields.
Why:
The values travel together to the line builder, and a struct keeps the call readable.
In TS you’d write (pseudocode):
type AuditRecord = { timeMillis: bigint; pid: number; parentPid: number; form: string; outcome: string; /* ... */ };Fields§
§time_millis: u128Milliseconds since the Unix epoch.
process: u32The wrapper process.
parent: u32The process that started it.
form: GuardedCommandThe guarded form.
outcome: AuditOutcomeWhat the policy decided.
place: &'record (PathBuf, &'static str)The common Git directory and the worktree kind.
directory: &'record PathThe working directory of the invocation.
arguments: &'record [OsString]The whole argument list, global options included.
dirty: Option<bool>Whether uncommitted state existed, when the policy asked.
Auto Trait Implementations§
impl<'record> Freeze for AuditRecord<'record>
impl<'record> RefUnwindSafe for AuditRecord<'record>
impl<'record> Send for AuditRecord<'record>
impl<'record> Sync for AuditRecord<'record>
impl<'record> Unpin for AuditRecord<'record>
impl<'record> UnsafeUnpin for AuditRecord<'record>
impl<'record> UnwindSafe for AuditRecord<'record>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more