pub struct AuditEventBuilder { /* private fields */ }Expand description
Builder for AuditEvent. Generated by AuditEvent::builder().
Implementations§
Source§impl AuditEventBuilder
impl AuditEventBuilder
pub fn principal(self, principal: impl Into<String>) -> Self
pub fn principal_opt(self, principal: Option<String>) -> Self
pub fn source(self, source: AuditAuthSource) -> Self
pub fn tenant(self, tenant: impl Into<String>) -> Self
pub fn resource(self, resource: impl Into<String>) -> Self
pub fn outcome(self, outcome: Outcome) -> Self
pub fn detail(self, detail: JsonValue) -> Self
Sourcepub fn field(self, field: AuditField) -> Self
pub fn field(self, field: AuditField) -> Self
Add a single typed audit field to the detail object. Goes
through AuditFieldEscaper so caller-supplied bytes never
reach format! or string concatenation — see ADR 0010.
Sourcepub fn fields(self, fields: impl IntoIterator<Item = AuditField>) -> Self
pub fn fields(self, fields: impl IntoIterator<Item = AuditField>) -> Self
Bulk variant of Self::field for multi-field call sites.
pub fn remote_addr(self, addr: impl Into<String>) -> Self
pub fn correlation_id(self, cid: impl Into<String>) -> Self
pub fn build(self) -> AuditEvent
Auto Trait Implementations§
impl Freeze for AuditEventBuilder
impl RefUnwindSafe for AuditEventBuilder
impl Send for AuditEventBuilder
impl Sync for AuditEventBuilder
impl Unpin for AuditEventBuilder
impl UnsafeUnpin for AuditEventBuilder
impl UnwindSafe for AuditEventBuilder
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request