pub enum BlobScope {
Master,
Derived(String),
}Expand description
Which key encrypts a blob, as a host names it on a BlobRef.
The host names what a blob is scoped to — the whole store or a derived per-scope key — never the raw key bytes. Storage and encryption consume this same type; there is no key material in it to leak.
Variants§
Master
The store master key — every member reads it.
Derived(String)
A per-scope key derived from the master key (e.g. one key per item).
Implementations§
Source§impl BlobScope
impl BlobScope
Sourcepub fn to_outbox_str(&self) -> String
pub fn to_outbox_str(&self) -> String
Serialize for the cloud_outbox.scope column. The audio outbox persists
the scope at enqueue and resolves it to a key at drain, so the string
must round-trip every variant. The variant tag is split from the payload
at the first :; the payload (a derived scope name) is stored verbatim,
so it may itself contain :.
Sourcepub fn from_outbox_str(s: &str) -> Option<BlobScope>
pub fn from_outbox_str(s: &str) -> Option<BlobScope>
Parse a cloud_outbox.scope value written by Self::to_outbox_str.
Returns None on an unknown tag (a corrupt row), which the drain surfaces
rather than silently defaulting to the master key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BlobScope
impl<'de> Deserialize<'de> for BlobScope
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlobScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BlobScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for BlobScope
impl Serialize for BlobScope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for BlobScope
impl StructuralPartialEq for BlobScope
Auto Trait Implementations§
impl Freeze for BlobScope
impl RefUnwindSafe for BlobScope
impl Send for BlobScope
impl Sync for BlobScope
impl Unpin for BlobScope
impl UnsafeUnpin for BlobScope
impl UnwindSafe for BlobScope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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