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
pub fn new(
id: Option<DocumentId>,
name: Option<DocumentName>,
grants: EitherOrBoth<ExplicitGrant, PolicyGrant>
) -> DocumentEncryptOpts
pub fn new(
id: Option<DocumentId>,
name: Option<DocumentName>,
grants: EitherOrBoth<ExplicitGrant, PolicyGrant>
) -> DocumentEncryptOpts
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.
pub fn with_explicit_grants(
id: Option<DocumentId>,
name: Option<DocumentName>,
grant_to_author: bool,
grants: Vec<UserOrGroup>
) -> DocumentEncryptOpts
pub fn with_explicit_grants(
id: Option<DocumentId>,
name: Option<DocumentName>,
grant_to_author: bool,
grants: Vec<UserOrGroup>
) -> DocumentEncryptOpts
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 documentgrants
- List of users and groups that should have access to read and decrypt this document
pub fn with_policy_grants(
id: Option<DocumentId>,
name: Option<DocumentName>,
policy: PolicyGrant
) -> DocumentEncryptOpts
pub fn with_policy_grants(
id: Option<DocumentId>,
name: Option<DocumentName>,
policy: PolicyGrant
) -> DocumentEncryptOpts
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for DocumentEncryptOpts
impl Send for DocumentEncryptOpts
impl Sync for DocumentEncryptOpts
impl Unpin for DocumentEncryptOpts
impl UnwindSafe for DocumentEncryptOpts
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
pub fn clear(&mut self)
pub fn clear(&mut self)
Completely overwrites this value.
Compare self to key
and return true
if they are equal.
impl<T> InitializableFromZeroed for T where
T: Default,
impl<T> InitializableFromZeroed for T where
T: Default,
pub unsafe fn initialize(place: *mut T)
pub unsafe fn initialize(place: *mut T)
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
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V