pub struct LienNotaireUseCases { /* private fields */ }Implementations§
Source§impl LienNotaireUseCases
impl LienNotaireUseCases
pub fn new(repo: Arc<dyn LienNotaireRepository>) -> Self
Sourcepub async fn issue(
&self,
etat_date_id: Uuid,
emis_par: Uuid,
) -> Result<IssuedLienNotaireDto, AppError>
pub async fn issue( &self, etat_date_id: Uuid, emis_par: Uuid, ) -> Result<IssuedLienNotaireDto, AppError>
Issue a new link. Caller MUST have already authorised the request
(org-scope check on etat_date_id happens at the handler level, via
verify_etat_date_org_access).
Sourcepub async fn renew(
&self,
etat_date_id: Uuid,
) -> Result<LienNotaireStatusDto, AppError>
pub async fn renew( &self, etat_date_id: Uuid, ) -> Result<LienNotaireStatusDto, AppError>
Renew the active link for a given état daté — same token, expiry pushed seven days from now.
Sourcepub async fn revoke(
&self,
etat_date_id: Uuid,
revoked_by: Uuid,
) -> Result<(), AppError>
pub async fn revoke( &self, etat_date_id: Uuid, revoked_by: Uuid, ) -> Result<(), AppError>
Revoke the active link for a given état daté.
Sourcepub async fn verify_token(
&self,
etat_date_id: Uuid,
clear_token: &str,
) -> Result<LienNotaire, AppError>
pub async fn verify_token( &self, etat_date_id: Uuid, clear_token: &str, ) -> Result<LienNotaire, AppError>
Verify a clear token grants access to etat_date_id. Repeatable —
does NOT consume the link (ADR 0051, multi-lecture).
Possible errors (all 403 by design, uniform with “unknown token” to
defeat enumeration — same rationale as MagicLinkInvalid):
AppError::NotaryLinkInvalid— forged / unknown / wrong état daté.AppError::NotaryLinkExpired— the seven days elapsed.AppError::NotaryLinkRevoked— the syndic killed it early.
Auto Trait Implementations§
impl !RefUnwindSafe for LienNotaireUseCases
impl !UnwindSafe for LienNotaireUseCases
impl Freeze for LienNotaireUseCases
impl Send for LienNotaireUseCases
impl Sync for LienNotaireUseCases
impl Unpin for LienNotaireUseCases
impl UnsafeUnpin for LienNotaireUseCases
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.