pub enum EncryptionReferenceMode {
DisallowPlain,
DisallowPlainExcept(BTreeSet<Cid>),
DisallowExcept(BTreeSet<Cid>),
AllowPlain,
AllowPlainIfExists,
Warning,
}Variants§
DisallowPlain
Disallow any references that are not encrypted. Allowed references:
- Plain: NO
- Unrelated encrypted: YES
- CoReference: YES
DisallowPlainExcept(BTreeSet<Cid>)
Disallow any references that are not encrypted except specific plain references. Unrelated encrypted references are allowed. Allowed references:
- Plain: SPECIFIC
- Unrelated encrypted: YES
- CoReference: YES
DisallowExcept(BTreeSet<Cid>)
Disallow any references that are not encrypted except specific references. Allowed references:
- Plain: SPECIFIC
- Unrelated encrypted: SPECIFIC
- CoReference: YES
AllowPlain
Allow any plain references. Allowed references:
- Plain: YES
- Unrelated encrypted: YES
- CoReference: YES
AllowPlainIfExists
Allow any plain references if the exists in parent storage. Allowed references:
- Plain: IF EXISTS
- Unrelated encrypted: YES
- CoReference: YES
Warning
Allow any plain references but warn (log) about unencrypted references. Allowed references:
- Plain: YES, WITH WARNING
- Unrelated encrypted: YES
- CoReference: YES
Implementations§
Source§impl EncryptionReferenceMode
impl EncryptionReferenceMode
Sourcepub async fn is_reference_allowed<S>(
&self,
next: &S,
reference: Cid,
parent: Cid,
) -> boolwhere
S: BlockStorage,
pub async fn is_reference_allowed<S>(
&self,
next: &S,
reference: Cid,
parent: Cid,
) -> boolwhere
S: BlockStorage,
Test if reference is allowed in parent.
Note: For mode Warning, the caller is responsible for the warning.
Trait Implementations§
Source§impl Clone for EncryptionReferenceMode
impl Clone for EncryptionReferenceMode
Source§fn clone(&self) -> EncryptionReferenceMode
fn clone(&self) -> EncryptionReferenceMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EncryptionReferenceMode
impl Debug for EncryptionReferenceMode
Source§impl Default for EncryptionReferenceMode
impl Default for EncryptionReferenceMode
Source§fn default() -> EncryptionReferenceMode
fn default() -> EncryptionReferenceMode
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EncryptionReferenceMode
impl RefUnwindSafe for EncryptionReferenceMode
impl Send for EncryptionReferenceMode
impl Sync for EncryptionReferenceMode
impl Unpin for EncryptionReferenceMode
impl UnsafeUnpin for EncryptionReferenceMode
impl UnwindSafe for EncryptionReferenceMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more