pub struct MethodRegistry<'a> { /* private fields */ }Expand description
A registry of configured unlock methods, keyed by MethodKind.
The broker builds this from config at startup (which method has the phrase /
recipient / key file this boot). open_bundle consults it per slot.
Implementations§
Source§impl<'a> MethodRegistry<'a>
impl<'a> MethodRegistry<'a>
Sourcepub fn with(self, method: &'a dyn UnlockMethod) -> Self
pub fn with(self, method: &'a dyn UnlockMethod) -> Self
Register a method under its kind (last registration wins).
Sourcepub fn get(&self, kind: MethodKind) -> Option<&'a dyn UnlockMethod>
pub fn get(&self, kind: MethodKind) -> Option<&'a dyn UnlockMethod>
The configured method for kind, if any.
Trait Implementations§
Source§impl<'a> Default for MethodRegistry<'a>
impl<'a> Default for MethodRegistry<'a>
Source§fn default() -> MethodRegistry<'a>
fn default() -> MethodRegistry<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MethodRegistry<'a>
impl<'a> !UnwindSafe for MethodRegistry<'a>
impl<'a> Freeze for MethodRegistry<'a>
impl<'a> Send for MethodRegistry<'a>
impl<'a> Sync for MethodRegistry<'a>
impl<'a> Unpin for MethodRegistry<'a>
impl<'a> UnsafeUnpin for MethodRegistry<'a>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request