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.
- Request
Builder - Use builder syntax to set the inputs and finish with
build(). - Service
- Deterministic daycare assignment service for playgroup placement decisions.
Enums§
- Block
Reason - Reasons assignment is blocked rather than merely waitlisted.
- Decision
- Playgroup assignment outcome staff can act on or review.
- Waitlist
Reason - Reasons a daycare assignment should waitlist instead of placing the pet.