Skip to main content

validate

Function validate 

Source
pub fn validate(
    offered: &[Decision],
    selections: &Selections,
) -> Result<(), AnswerError>
Expand description

Check every selection against the decisions a plan offers.

ยงErrors

AnswerError::Unknown for an identifier the plan does not offer, and AnswerError::Rejected for an answer it does not accept. A stale answer is one of those two: a decision the plan stopped offering, or an answer it stopped accepting.