pub struct ModuleRegistryUseCases { /* private fields */ }Implementations§
Source§impl ModuleRegistryUseCases
impl ModuleRegistryUseCases
pub fn new( registry: Arc<dyn ModuleRegistry>, acp_use_cases: Arc<AcpUseCases>, ) -> Self
Sourcepub fn reconnaitre(nom: &str) -> Result<Module, AppError>
pub fn reconnaitre(nom: &str) -> Result<Module, AppError>
Traduit un nom reçu sur le fil en module connu.
Rendu 422 UnknownModule (Story 5.1 @negative) — distinct d’un 403
ModuleDisabled : le client doit pouvoir distinguer « ce nom
n’existe pas » de « ce module est éteint », sinon il réessaie un nom
qui ne marchera jamais.
Sourcepub async fn list_enabled(
&self,
caller: &AcpCaller,
acp_id: Uuid,
) -> Result<Vec<Module>, AppError>
pub async fn list_enabled( &self, caller: &AcpCaller, acp_id: Uuid, ) -> Result<Vec<Module>, AppError>
Les modules actifs d’une ACP, pour un appelant dans sa portée.
Sourcepub async fn enable(
&self,
caller: &AcpCaller,
acp_id: Uuid,
module: Module,
) -> Result<(), AppError>
pub async fn enable( &self, caller: &AcpCaller, acp_id: Uuid, module: Module, ) -> Result<(), AppError>
Allume un module. Idempotent.
Sourcepub async fn disable(
&self,
caller: &AcpCaller,
acp_id: Uuid,
module: Module,
) -> Result<(), AppError>
pub async fn disable( &self, caller: &AcpCaller, acp_id: Uuid, module: Module, ) -> Result<(), AppError>
Éteint un module. Idempotent, et sans rien détruire (INV-27).
Le refus sur identity est vérifié après la portée et les droits :
un appelant hors portée ne doit pas apprendre, via un 403 différent,
quels modules l’ACP possède.
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleRegistryUseCases
impl !UnwindSafe for ModuleRegistryUseCases
impl Freeze for ModuleRegistryUseCases
impl Send for ModuleRegistryUseCases
impl Sync for ModuleRegistryUseCases
impl Unpin for ModuleRegistryUseCases
impl UnsafeUnpin for ModuleRegistryUseCases
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
§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>
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.