pub struct SkillUseCases { /* private fields */ }Implementations§
Source§impl SkillUseCases
impl SkillUseCases
pub fn new( skill_repo: Arc<dyn SkillRepository>, owner_repo: Arc<dyn OwnerRepository>, ) -> Self
Sourcepub async fn create_skill(
&self,
owner_id: Uuid,
dto: CreateSkillDto,
) -> Result<SkillResponseDto, String>
pub async fn create_skill( &self, owner_id: Uuid, dto: CreateSkillDto, ) -> Result<SkillResponseDto, String>
Sourcepub async fn get_skill(
&self,
skill_id: Uuid,
) -> Result<SkillResponseDto, String>
pub async fn get_skill( &self, skill_id: Uuid, ) -> Result<SkillResponseDto, String>
Get skill by ID with owner name enrichment
Sourcepub async fn list_building_skills(
&self,
building_id: Uuid,
) -> Result<Vec<SkillSummaryDto>, String>
pub async fn list_building_skills( &self, building_id: Uuid, ) -> Result<Vec<SkillSummaryDto>, String>
List all skills for a building
§Returns
- Skills sorted by available (DESC), expertise (DESC), skill_name (ASC)
Sourcepub async fn list_available_skills(
&self,
building_id: Uuid,
) -> Result<Vec<SkillSummaryDto>, String>
pub async fn list_available_skills( &self, building_id: Uuid, ) -> Result<Vec<SkillSummaryDto>, String>
List available skills for a building (marketplace view)
§Returns
- Only available skills (is_available_for_help = true)
Sourcepub async fn list_owner_skills(
&self,
owner_id: Uuid,
) -> Result<Vec<SkillSummaryDto>, String>
pub async fn list_owner_skills( &self, owner_id: Uuid, ) -> Result<Vec<SkillSummaryDto>, String>
List all skills created by an owner
Sourcepub async fn list_skills_by_category(
&self,
building_id: Uuid,
category: SkillCategory,
) -> Result<Vec<SkillSummaryDto>, String>
pub async fn list_skills_by_category( &self, building_id: Uuid, category: SkillCategory, ) -> Result<Vec<SkillSummaryDto>, String>
List skills by category (HomeRepair, Languages, Technology, etc.)
Sourcepub async fn list_skills_by_expertise(
&self,
building_id: Uuid,
level: ExpertiseLevel,
) -> Result<Vec<SkillSummaryDto>, String>
pub async fn list_skills_by_expertise( &self, building_id: Uuid, level: ExpertiseLevel, ) -> Result<Vec<SkillSummaryDto>, String>
List skills by expertise level (Beginner, Intermediate, Advanced, Expert)
Sourcepub async fn list_free_skills(
&self,
building_id: Uuid,
) -> Result<Vec<SkillSummaryDto>, String>
pub async fn list_free_skills( &self, building_id: Uuid, ) -> Result<Vec<SkillSummaryDto>, String>
List free/volunteer skills for a building
Sourcepub async fn list_professional_skills(
&self,
building_id: Uuid,
) -> Result<Vec<SkillSummaryDto>, String>
pub async fn list_professional_skills( &self, building_id: Uuid, ) -> Result<Vec<SkillSummaryDto>, String>
List professional skills for a building (Expert level OR certifications)
Sourcepub async fn update_skill(
&self,
skill_id: Uuid,
actor_id: Uuid,
dto: UpdateSkillDto,
) -> Result<SkillResponseDto, String>
pub async fn update_skill( &self, skill_id: Uuid, actor_id: Uuid, dto: UpdateSkillDto, ) -> Result<SkillResponseDto, String>
Sourcepub async fn mark_skill_available(
&self,
skill_id: Uuid,
actor_id: Uuid,
) -> Result<SkillResponseDto, String>
pub async fn mark_skill_available( &self, skill_id: Uuid, actor_id: Uuid, ) -> Result<SkillResponseDto, String>
Sourcepub async fn get_skill_statistics(
&self,
building_id: Uuid,
) -> Result<SkillStatisticsDto, String>
pub async fn get_skill_statistics( &self, building_id: Uuid, ) -> Result<SkillStatisticsDto, String>
Get skill statistics for a building
Auto Trait Implementations§
impl Freeze for SkillUseCases
impl !RefUnwindSafe for SkillUseCases
impl Send for SkillUseCases
impl Sync for SkillUseCases
impl Unpin for SkillUseCases
impl !UnwindSafe for SkillUseCases
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<T> Chain<T> for T
impl<T> Chain<T> for T
§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.