Skip to main content

Module assignment

Module assignment 

Source
Expand description

Daycare playgroup assignment decisions after eligibility and coverage are known.

use domain::{daycare, entities};
use uuid::Uuid;

let request = daycare::assignment::Request::builder()
    .pet_id(entities::PetId(Uuid::nil()))
    .service(daycare::ServiceVariant::AllDayPlay)
    .eligibility(daycare::eligibility::GroupPlayDecision::Eligible {
        basis: daycare::eligibility::EligibleBasis::CurrentEvidence,
    })
    .coverage(daycare::coverage::Decision::Sufficient)
    .playgroup(daycare::assignment::PlaygroupId::try_new("small-dogs-am").unwrap())
    .build();

assert!(matches!(
    daycare::assignment::Service.assign(request),
    daycare::assignment::Decision::Assigned { .. }
));

Re-exports§

pub use playgroup_id::Id as PlaygroupId;

Modules§

playgroup_id
Playgroup identifier boundary for daycare assignment contracts.

Structs§

Request
Assignment request that joins pet, service, eligibility, coverage, and target playgroup evidence.
RequestBuilder
Use builder syntax to set the inputs and finish with build().
Service
Deterministic daycare assignment service for playgroup placement decisions.

Enums§

BlockReason
Reasons assignment is blocked rather than merely waitlisted.
Decision
Playgroup assignment outcome staff can act on or review.
WaitlistReason
Reasons a daycare assignment should waitlist instead of placing the pet.