pub struct UpdateUseCase<E, DTO, S> { /* private fields */ }Expand description
Generic “update entity” use case.
Implementations§
Source§impl<E, DTO, S> UpdateUseCase<E, DTO, S>
impl<E, DTO, S> UpdateUseCase<E, DTO, S>
pub fn new( service: Arc<S>, updater: Arc<dyn EntityUpdater<E, DTO>>, hooks: Arc<dyn UseCaseHooks<E, DTO>>, ) -> Self
pub async fn execute(&self, id: &str, dto: DTO) -> UseCaseResult<E>
Auto Trait Implementations§
impl<E, DTO, S> !RefUnwindSafe for UpdateUseCase<E, DTO, S>
impl<E, DTO, S> !UnwindSafe for UpdateUseCase<E, DTO, S>
impl<E, DTO, S> Freeze for UpdateUseCase<E, DTO, S>where
Arc<S>: Freeze,
Arc<dyn EntityUpdater<E, DTO>>: Freeze,
Arc<dyn UseCaseHooks<E, DTO>>: Freeze,
PhantomData<(E, DTO)>: Freeze,
impl<E, DTO, S> Send for UpdateUseCase<E, DTO, S>where
Arc<S>: Send,
Arc<dyn EntityUpdater<E, DTO>>: Send,
Arc<dyn UseCaseHooks<E, DTO>>: Send,
PhantomData<(E, DTO)>: Send,
impl<E, DTO, S> Sync for UpdateUseCase<E, DTO, S>where
Arc<S>: Sync,
Arc<dyn EntityUpdater<E, DTO>>: Sync,
Arc<dyn UseCaseHooks<E, DTO>>: Sync,
PhantomData<(E, DTO)>: Sync,
impl<E, DTO, S> Unpin for UpdateUseCase<E, DTO, S>where
Arc<S>: Unpin,
Arc<dyn EntityUpdater<E, DTO>>: Unpin,
Arc<dyn UseCaseHooks<E, DTO>>: Unpin,
PhantomData<(E, DTO)>: Unpin,
impl<E, DTO, S> UnsafeUnpin for UpdateUseCase<E, DTO, S>where
Arc<S>: UnsafeUnpin,
Arc<dyn EntityUpdater<E, DTO>>: UnsafeUnpin,
Arc<dyn UseCaseHooks<E, DTO>>: UnsafeUnpin,
PhantomData<(E, DTO)>: UnsafeUnpin,
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 more