pub struct AuditEvent {
pub event_type: AuditEventType,
pub ca_id: Option<String>,
pub subject: Option<String>,
pub detail: Option<String>,
pub client_addr: Option<String>,
pub operator: Option<String>,
}Expand description
A single audit event ready for recording.
Fields§
§event_type: AuditEventTypeThe type of auditable event.
ca_id: Option<String>CA identifier (when the event is CA-specific).
subject: Option<String>Subject of the event (e.g., certificate subject DN, operator name).
detail: Option<String>Human-readable detail string.
client_addr: Option<String>Client IP address (when applicable).
operator: Option<String>Operator identity (for admin actions).
Implementations§
Source§impl AuditEvent
impl AuditEvent
Sourcepub fn new(event_type: AuditEventType) -> Self
pub fn new(event_type: AuditEventType) -> Self
Create a new audit event with the given type.
Sourcepub fn with_ca_id(self, ca_id: impl Into<String>) -> Self
pub fn with_ca_id(self, ca_id: impl Into<String>) -> Self
Builder: set the CA ID.
Sourcepub fn with_subject(self, subject: impl Into<String>) -> Self
pub fn with_subject(self, subject: impl Into<String>) -> Self
Builder: set the subject.
Sourcepub fn with_detail(self, detail: impl Into<String>) -> Self
pub fn with_detail(self, detail: impl Into<String>) -> Self
Builder: set the detail.
Sourcepub fn with_client_addr(self, addr: impl Into<String>) -> Self
pub fn with_client_addr(self, addr: impl Into<String>) -> Self
Builder: set the client address.
Sourcepub fn with_operator(self, operator: impl Into<String>) -> Self
pub fn with_operator(self, operator: impl Into<String>) -> Self
Builder: set the operator.
Auto Trait Implementations§
impl Freeze for AuditEvent
impl RefUnwindSafe for AuditEvent
impl Send for AuditEvent
impl Sync for AuditEvent
impl Unpin for AuditEvent
impl UnsafeUnpin for AuditEvent
impl UnwindSafe for AuditEvent
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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