pub struct ServiceProviderUseCases {
pub repo: Arc<dyn ServiceProviderRepository>,
}Fields§
§repo: Arc<dyn ServiceProviderRepository>Implementations§
Source§impl ServiceProviderUseCases
impl ServiceProviderUseCases
pub fn new(repo: Arc<dyn ServiceProviderRepository>) -> Self
Sourcepub async fn create(
&self,
organization_id: Uuid,
dto: CreateServiceProviderDto,
) -> Result<ServiceProviderResponseDto, String>
pub async fn create( &self, organization_id: Uuid, dto: CreateServiceProviderDto, ) -> Result<ServiceProviderResponseDto, String>
Create a new service provider
Sourcepub async fn search(
&self,
query: &SearchServiceProvidersQuery,
) -> Result<Vec<ServiceProviderResponseDto>, String>
pub async fn search( &self, query: &SearchServiceProvidersQuery, ) -> Result<Vec<ServiceProviderResponseDto>, String>
Search providers with filters
Sourcepub async fn find_by_slug(
&self,
slug: &str,
) -> Result<Option<ServiceProviderResponseDto>, String>
pub async fn find_by_slug( &self, slug: &str, ) -> Result<Option<ServiceProviderResponseDto>, String>
Find provider by slug (public profile)
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceProviderUseCases
impl !UnwindSafe for ServiceProviderUseCases
impl Freeze for ServiceProviderUseCases
impl Send for ServiceProviderUseCases
impl Sync for ServiceProviderUseCases
impl Unpin for ServiceProviderUseCases
impl UnsafeUnpin for ServiceProviderUseCases
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.