Struct ironoxide::document::DocumentEncryptOpts
source · [−]pub struct DocumentEncryptOpts { /* private fields */ }
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
sourceimpl DocumentEncryptOpts
impl DocumentEncryptOpts
sourcepub 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.
sourcepub 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
sourcepub 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
sourceimpl Clone for DocumentEncryptOpts
impl Clone for DocumentEncryptOpts
sourcefn clone(&self) -> DocumentEncryptOpts
fn clone(&self) -> DocumentEncryptOpts
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DocumentEncryptOpts
impl Debug for DocumentEncryptOpts
sourceimpl Default for DocumentEncryptOpts
impl Default for DocumentEncryptOpts
sourceimpl Hash for DocumentEncryptOpts
impl Hash for DocumentEncryptOpts
sourceimpl PartialEq<DocumentEncryptOpts> for DocumentEncryptOpts
impl PartialEq<DocumentEncryptOpts> for DocumentEncryptOpts
sourcefn eq(&self, other: &DocumentEncryptOpts) -> bool
fn eq(&self, other: &DocumentEncryptOpts) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DocumentEncryptOpts) -> bool
fn ne(&self, other: &DocumentEncryptOpts) -> bool
This method tests for !=
.
impl Eq for DocumentEncryptOpts
impl StructuralEq for DocumentEncryptOpts
impl StructuralPartialEq for DocumentEncryptOpts
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
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,
fn clear(&mut self)
fn clear(&mut self)
Completely overwrites this value.
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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,
unsafe fn initialize(place: *mut T)
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more