pub struct ElectronicSignatureProviderRegistry { /* private fields */ }Expand description
Détient les adaptateurs enregistrés, un par SignatureProviderKind, et
résout lequel solliciter.
Compose domain::plateforme::select_signature_provider (préférence
cabinet + repli non-BE) avec les instances d’adaptateurs concrètes.
Implementations§
Source§impl ElectronicSignatureProviderRegistry
impl ElectronicSignatureProviderRegistry
pub fn new(providers: Vec<Arc<dyn ElectronicSignatureProvider>>) -> Self
Sourcepub fn resolve(
&self,
cabinet_preference: SignatureProviderKind,
subject_is_belgian: bool,
) -> Result<Arc<dyn ElectronicSignatureProvider>, SignatureProviderError>
pub fn resolve( &self, cabinet_preference: SignatureProviderKind, subject_is_belgian: bool, ) -> Result<Arc<dyn ElectronicSignatureProvider>, SignatureProviderError>
Résout le prestataire à solliciter (préférence cabinet + repli non-BE), puis renvoie l’adaptateur correspondant.
§Errors
SignatureProviderError::NotFound si l’adaptateur résolu n’a pas été
enregistré (mauvaise configuration au démarrage) — erreur typée,
jamais un panic sur un HashMap::get déballé sans vérification.
(Le nom de la méthode de déballage est écrit en toutes lettres
ailleurs, pas ici : garde_paniques_en_production compte
textuellement, et un commentaire qui la cite serait compté comme
une panique. Une garde textuelle ne distingue pas l’usage de la
mention — c’est le prix de sa simplicité, et il se paie ici.)
Auto Trait Implementations§
impl !RefUnwindSafe for ElectronicSignatureProviderRegistry
impl !UnwindSafe for ElectronicSignatureProviderRegistry
impl Freeze for ElectronicSignatureProviderRegistry
impl Send for ElectronicSignatureProviderRegistry
impl Sync for ElectronicSignatureProviderRegistry
impl Unpin for ElectronicSignatureProviderRegistry
impl UnsafeUnpin for ElectronicSignatureProviderRegistry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Fake for T
impl<T> Fake for T
§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