Struct ironoxide::document::DocumentEncryptOpts[][src]

pub struct DocumentEncryptOpts { /* fields omitted */ }
Expand description

Parameters that can be provided when encrypting a new document.

Document IDs must be unique to the segment. If no ID is provided, one will be generated for it. If no name is provided, the document’s name will be left empty. Neither the document’s ID nor name will be encrypted.

Default values are provided with DocumentEncryptOpts::default().

Implementations

Constructs a new DocumentEncryptOpts.

Document encryption requires an ExplicitGrant, a PolicyGrant, or both. If only using one type of grant, consider using with_explicit_grants or with_policy_grants instead.

Arguments

  • id - ID to use for the document.
  • name - Name to use for the document.
  • grants - Grants that control who will have access to read and decrypt this document.

Constructs a new DocumentEncryptOpts with access explicitly granted to certain users and groups.

Arguments

  • id - ID to use for the document.
  • name - Name to use for the document.
  • grant_to_author - true if the calling user should have access to decrypt the document
  • grants - List of users and groups that should have access to read and decrypt this document

Constructs a new DocumentEncryptOpts with access granted by a policy.

Arguments

  • id - ID to use for the document.
  • name - Name to use for the document.
  • policy - Policy to determine which users and groups will have access to read and decrypt this document. See the policy module for more information.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Constructs a DocumentEncryptOpts with common values.

The document will have a generated ID and no name. Only the document’s author will be able to read and decrypt it.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Completely overwrites this value.

Compare self to key and return true if they are equal.

Performs the conversion.

Called to initialize a place to a valid value, after it is set to all-bits-zero. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.