pub struct WrapRef { /* private fields */ }Expand description
The key a backend wrapped under: its backend’s kind and the backend’s own reference of the key and its version (an ARN, a key URL with its version, a transit mount and key, a token object’s id).
Implementations§
Source§impl WrapRef
impl WrapRef
Sourcepub fn new(
kind: BackendKind,
key: impl Into<String>,
) -> Result<WrapRef, BlobError>
pub fn new( kind: BackendKind, key: impl Into<String>, ) -> Result<WrapRef, BlobError>
The reference of key at a backend of kind.
§Errors
BlobError::KeyRef when key is empty, longer than
MAX_KEY_REF bytes, or holds a byte that is not printable ASCII
(a space included).
Sourcepub fn parse(text: &str) -> Result<WrapRef, BlobError>
pub fn parse(text: &str) -> Result<WrapRef, BlobError>
The reference as WrapRef’s Display writes it: the kind’s name,
a colon, the key.
§Errors
BlobError::RefText when the text does not start with a known
kind’s name and a colon, and BlobError::KeyRef when the key after
it is not one WrapRef::new takes.
Sourcepub fn kind(&self) -> BackendKind
pub fn kind(&self) -> BackendKind
The backend’s kind.
Trait Implementations§
impl Eq for WrapRef
impl StructuralPartialEq for WrapRef
Auto Trait Implementations§
impl Forget for WrapRef
impl Freeze for WrapRef
impl Move for WrapRef
impl RefUnwindSafe for WrapRef
impl Send for WrapRef
impl Sync for WrapRef
impl Unpin for WrapRef
impl UnsafeUnpin for WrapRef
impl UnwindSafe for WrapRef
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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.
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more