Struct Builder

Source
pub struct Builder<T>(/* private fields */);
Expand description

A builder for AuditLogV3

Implementations§

Source§

impl Builder<TypeStage>

Source

pub fn type_(self, type_: impl Into<String>) -> Builder<DeploymentStage>

Sets the type_ field.

Source§

impl Builder<DeploymentStage>

Source

pub fn deployment(self, deployment: impl Into<String>) -> Builder<HostStage>

Sets the deployment field.

Source§

impl Builder<HostStage>

Source

pub fn host(self, host: impl Into<String>) -> Builder<ProductStage>

Sets the host field.

Source§

impl Builder<ProductStage>

Source

pub fn product(self, product: impl Into<String>) -> Builder<ProductVersionStage>

Sets the product field.

Source§

impl Builder<ProductVersionStage>

Source

pub fn product_version( self, product_version: impl Into<String>, ) -> Builder<ProducerTypeStage>

Sets the product_version field.

Source§

impl Builder<ProducerTypeStage>

Source

pub fn producer_type( self, producer_type: AuditProducer, ) -> Builder<EventIdStage>

Sets the producer_type field.

Source§

impl Builder<EventIdStage>

Source

pub fn event_id(self, event_id: Uuid) -> Builder<TimeStage>

Sets the event_id field.

Source§

impl Builder<TimeStage>

Source

pub fn time(self, time: DateTime<Utc>) -> Builder<NameStage>

Sets the time field.

Source§

impl Builder<NameStage>

Source

pub fn name(self, name: impl Into<String>) -> Builder<ResultStage>

Sets the name field.

Source§

impl Builder<ResultStage>

Source

pub fn result(self, result: AuditResult) -> Builder<Complete>

Sets the result field.

Source§

impl Builder<Complete>

Source

pub fn type_(self, type_: impl Into<String>) -> Self

Sets the type_ field.

Source

pub fn deployment(self, deployment: impl Into<String>) -> Self

Sets the deployment field.

Source

pub fn host(self, host: impl Into<String>) -> Self

Sets the host field.

Source

pub fn product(self, product: impl Into<String>) -> Self

Sets the product field.

Source

pub fn product_version(self, product_version: impl Into<String>) -> Self

Sets the product_version field.

Source

pub fn stack(self, stack: impl Into<Option<String>>) -> Self

Sets the stack field.

Source

pub fn service(self, service: impl Into<Option<String>>) -> Self

Sets the service field.

Source

pub fn environment(self, environment: impl Into<Option<String>>) -> Self

Sets the environment field.

Source

pub fn producer_type(self, producer_type: AuditProducer) -> Self

Sets the producer_type field.

Source

pub fn push_organizations(self, organizations: Organization) -> Self

Adds a value to the organizations field.

Source

pub fn organizations( self, organizations: impl IntoIterator<Item = Organization>, ) -> Self

Sets the organizations field.

Source

pub fn extend_organizations( self, organizations: impl IntoIterator<Item = Organization>, ) -> Self

Adds values to the organizations field.

Source

pub fn event_id(self, event_id: Uuid) -> Self

Sets the event_id field.

Source

pub fn log_entry_id(self, log_entry_id: impl Into<Option<Uuid>>) -> Self

Sets the log_entry_id field.

Source

pub fn sequence_id(self, sequence_id: impl Into<Option<i32>>) -> Self

Sets the sequence_id field.

Source

pub fn user_agent(self, user_agent: impl Into<Option<String>>) -> Self

Sets the user_agent field.

Source

pub fn push_categories(self, categories: impl Into<String>) -> Self

Adds a value to the categories field.

Source

pub fn categories( self, categories: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Sets the categories field.

Source

pub fn extend_categories( self, categories: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Adds values to the categories field.

Source

pub fn push_entities(self, entities: impl Serialize) -> Self

Adds a value to the entities field.

Source

pub fn entities( self, entities: impl IntoIterator<Item = impl Serialize>, ) -> Self

Sets the entities field.

Source

pub fn extend_entities( self, entities: impl IntoIterator<Item = impl Serialize>, ) -> Self

Adds values to the entities field.

Source

pub fn push_users(self, users: ContextualizedUser) -> Self

Adds a value to the users field.

Source

pub fn users(self, users: impl IntoIterator<Item = ContextualizedUser>) -> Self

Sets the users field.

Source

pub fn extend_users( self, users: impl IntoIterator<Item = ContextualizedUser>, ) -> Self

Adds values to the users field.

Source

pub fn push_origins(self, origins: impl Into<String>) -> Self

Adds a value to the origins field.

Source

pub fn origins( self, origins: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Sets the origins field.

Source

pub fn extend_origins( self, origins: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Adds values to the origins field.

Source

pub fn source_origin(self, source_origin: impl Into<Option<String>>) -> Self

Sets the source_origin field.

Source

pub fn insert_request_params( self, key: impl Into<String>, value: SensitivityTaggedValue, ) -> Self

Adds an entry to the request_params field.

Source

pub fn request_params( self, request_params: impl IntoIterator<Item = (impl Into<String>, SensitivityTaggedValue)>, ) -> Self

Sets the request_params field.

Source

pub fn extend_request_params( self, request_params: impl IntoIterator<Item = (impl Into<String>, SensitivityTaggedValue)>, ) -> Self

Adds entries to the request_params field.

Source

pub fn insert_request_fields( self, key: impl Into<String>, value: impl Serialize, ) -> Self

Adds an entry to the request_fields field.

Source

pub fn request_fields( self, request_fields: impl IntoIterator<Item = (impl Into<String>, impl Serialize)>, ) -> Self

Sets the request_fields field.

Source

pub fn extend_request_fields( self, request_fields: impl IntoIterator<Item = (impl Into<String>, impl Serialize)>, ) -> Self

Adds entries to the request_fields field.

Source

pub fn insert_result_params( self, key: impl Into<String>, value: SensitivityTaggedValue, ) -> Self

Adds an entry to the result_params field.

Source

pub fn result_params( self, result_params: impl IntoIterator<Item = (impl Into<String>, SensitivityTaggedValue)>, ) -> Self

Sets the result_params field.

Source

pub fn extend_result_params( self, result_params: impl IntoIterator<Item = (impl Into<String>, SensitivityTaggedValue)>, ) -> Self

Adds entries to the result_params field.

Source

pub fn insert_result_fields( self, key: impl Into<String>, value: impl Serialize, ) -> Self

Adds an entry to the result_fields field.

Source

pub fn result_fields( self, result_fields: impl IntoIterator<Item = (impl Into<String>, impl Serialize)>, ) -> Self

Sets the result_fields field.

Source

pub fn extend_result_fields( self, result_fields: impl IntoIterator<Item = (impl Into<String>, impl Serialize)>, ) -> Self

Adds entries to the result_fields field.

Source

pub fn time(self, time: DateTime<Utc>) -> Self

Sets the time field.

Source

pub fn uid(self, uid: impl Into<Option<UserId>>) -> Self

Sets the uid field.

Source

pub fn sid(self, sid: impl Into<Option<SessionId>>) -> Self

Sets the sid field.

Source

pub fn token_id(self, token_id: impl Into<Option<TokenId>>) -> Self

Sets the token_id field.

Source

pub fn org_id(self, org_id: impl Into<Option<OrganizationId>>) -> Self

Sets the org_id field.

Source

pub fn trace_id(self, trace_id: impl Into<Option<TraceId>>) -> Self

Sets the trace_id field.

Source

pub fn origin(self, origin: impl Into<Option<String>>) -> Self

Sets the origin field.

Source

pub fn name(self, name: impl Into<String>) -> Self

Sets the name field.

Source

pub fn result(self, result: AuditResult) -> Self

Sets the result field.

Source

pub fn build(self) -> AuditLogV3

Consumes the builder, returning a AuditLogV3.

Trait Implementations§

Source§

impl Default for Builder<TypeStage>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<AuditLogV3> for Builder<Complete>

Source§

fn from(v: AuditLogV3) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T> Freeze for Builder<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Builder<T>
where T: RefUnwindSafe,

§

impl<T> Send for Builder<T>
where T: Send,

§

impl<T> Sync for Builder<T>
where T: Sync,

§

impl<T> Unpin for Builder<T>
where T: Unpin,

§

impl<T> UnwindSafe for Builder<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.