pub struct AuditRecord {
pub event: AuditEvent,
pub profile: String,
pub actor: Actor,
pub account_id: Option<String>,
pub order_id: Option<String>,
pub cert_serial: Option<String>,
pub identifiers: Vec<String>,
pub client: ClientContext,
pub reason: Option<String>,
pub detail: Option<String>,
}Expand description
One row, before it is written.
Built with AuditRecord::new plus the with_* setters rather than a
struct literal: the four events populate different subsets — an issuance
failure has no serial, an accountless revocation has no account — and a
literal would mean a column of Nones at every call site.
Fields§
§event: AuditEvent§profile: String§actor: Actor§account_id: Option<String>§order_id: Option<String>§cert_serial: Option<String>§identifiers: Vec<String>§client: ClientContext§reason: Option<String>§detail: Option<String>Implementations§
Source§impl AuditRecord
impl AuditRecord
pub fn new(event: AuditEvent, profile: impl Into<String>, actor: Actor) -> Self
Sourcepub fn with_order(self, order: &Order) -> Self
pub fn with_order(self, order: &Order) -> Self
Fills in the subject from the order: its id, its account and the names it covers, the last frozen into the row rather than joined back — the order may be deleted long before the row is read.
pub fn with_account(self, account_id: impl Into<String>) -> Self
pub fn with_serial(self, serial: impl Into<String>) -> Self
pub fn with_client(self, client: ClientContext) -> Self
Sourcepub fn with_reason(self, reason: impl Into<String>) -> Self
pub fn with_reason(self, reason: impl Into<String>) -> Self
The RFC 8555 problem type on a refusal, or the RFC 5280 reason code on a revocation. Never both — see the column comment in the migration.
pub fn with_detail(self, detail: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for AuditRecord
impl Clone for AuditRecord
Source§fn clone(&self) -> AuditRecord
fn clone(&self) -> AuditRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuditRecord
impl RefUnwindSafe for AuditRecord
impl Send for AuditRecord
impl Sync for AuditRecord
impl Unpin for AuditRecord
impl UnsafeUnpin for AuditRecord
impl UnwindSafe for AuditRecord
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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