Skip to main content

CustomerStore

Trait CustomerStore 

Source
pub trait CustomerStore: Send + Sync {
    // Required methods
    fn get_customer<'life0, 'async_trait>(
        &'life0 self,
        id: CustomerId,
    ) -> Pin<Box<dyn Future<Output = Result<Customer>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_pet<'life0, 'async_trait>(
        &'life0 self,
        id: PetId,
    ) -> Pin<Box<dyn Future<Output = Result<Pet>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_reservation<'life0, 'async_trait>(
        &'life0 self,
        id: Id,
    ) -> Pin<Box<dyn Future<Output = Result<Reservation>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Read-only customer/reservation evidence store exposed to app workflows.

Implementations fetch source-grounded customer, pet, and reservation records for deterministic workflow evaluation. The trait is a read boundary: returned facts may be summarized or used to prepare review packets, but callers must use separate draft/review ports for any customer message, booking update, or provider-system write.

Required Methods§

Source

fn get_customer<'life0, 'async_trait>( &'life0 self, id: CustomerId, ) -> Pin<Box<dyn Future<Output = Result<Customer>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetches the customer record identified by id as app-owned evidence.

The returned customer can ground triage, retention, or communication drafts. A missing record should surface as Error::NotFound, and this read must not create, edit, merge, or contact the customer.

Source

fn get_pet<'life0, 'async_trait>( &'life0 self, id: PetId, ) -> Pin<Box<dyn Future<Output = Result<Pet>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetches the pet profile identified by id for policy and care-context checks.

The result may inform vaccine, temperament, service-line, or daily-care review packets. It is evidence only; it must not change pet profile fields or treat incomplete data as permission to invent missing facts.

Source

fn get_reservation<'life0, 'async_trait>( &'life0 self, id: Id, ) -> Pin<Box<dyn Future<Output = Result<Reservation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetches the reservation identified by id for source-grounded workflow state.

The result may drive booking triage, daily updates, checkout completion, or retention follow-up decisions. It must not confirm, cancel, check in, check out, or otherwise mutate the reservation.

Implementors§