pub struct BackendWrap<B> { /* private fields */ }Expand description
The backend over a key Backend: its root is a random key the
backend wraps, and each tenant key is wrapped locally under a new
key-encryption key of its own, bound to the tenant, which the backend
wraps. Debug shows the backend, its key and the root’s id only.
Implementations§
Source§impl<B: Backend> BackendWrap<B>
impl<B: Backend> BackendWrap<B>
Sourcepub fn open(backend: B, root_blob: &[u8]) -> Result<BackendWrap<B>, WrapError>
pub fn open(backend: B, root_blob: &[u8]) -> Result<BackendWrap<B>, WrapError>
The backend over the root root_blob holds, as BackendWrap::create
gave it; nothing is asked of the backend when the blob names another
key than its own.
§Errors
WrapError::Blob when the blob cannot be read,
WrapError::Elsewhere when it names another key, and any error
of the backend’s unwrap.
Trait Implementations§
Source§impl<B: Debug> Debug for BackendWrap<B>
impl<B: Debug> Debug for BackendWrap<B>
Source§impl<B: Backend> KeyWrap for BackendWrap<B>
impl<B: Backend> KeyWrap for BackendWrap<B>
Source§fn key_id(&self) -> KeyId
fn key_id(&self) -> KeyId
The root’s id: each key-encryption key wraps one tenant key only, so the count of wraps against the root bounds nothing else.
Source§fn root(&self) -> &Key
fn root(&self) -> &Key
The root of the hierarchy: the key the server catalog key is derived
from (
envelope::catalog_key).Auto Trait Implementations§
impl<B> Forget for BackendWrap<B>
impl<B> Freeze for BackendWrap<B>where
B: Freeze,
impl<B> Move for BackendWrap<B>
impl<B> RefUnwindSafe for BackendWrap<B>where
B: RefUnwindSafe,
impl<B> Send for BackendWrap<B>where
B: Send,
impl<B> Sync for BackendWrap<B>where
B: Sync,
impl<B> Unpin for BackendWrap<B>where
B: Unpin,
impl<B> UnsafeUnpin for BackendWrap<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for BackendWrap<B>where
B: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreCreates a shared type from an unshared type.