Skip to main content

ContractorEvaluationRepository

Trait ContractorEvaluationRepository 

Source
pub trait ContractorEvaluationRepository: Send + Sync {
    // Required methods
    fn save<'life0, 'life1, 'async_trait>(
        &'life0 self,
        evaluation: &'life1 ContractorEvaluation,
    ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn find_by_id<'life0, 'async_trait>(
        &'life0 self,
        id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ContractorEvaluation>, AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_for_contractor<'life0, 'async_trait>(
        &'life0 self,
        contractor_user_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ContractorEvaluation>, AppError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn save<'life0, 'life1, 'async_trait>( &'life0 self, evaluation: &'life1 ContractorEvaluation, ) -> Pin<Box<dyn Future<Output = Result<(), AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Persist a freshly minted evaluation (append-only).

Source

fn find_by_id<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<ContractorEvaluation>, AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_for_contractor<'life0, 'async_trait>( &'life0 self, contractor_user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ContractorEvaluation>, AppError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List every evaluation collected against a given contractor user, newest first. Used by the contractor’s “reputation” view.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§