#[non_exhaustive]
#[derive(Debug, Clone, Default)]
pub enum ClaimCheck {
IfPresent(String),
RequireAny(Vec<String>),
RequiredValue(String),
Present,
#[default]
NoCheck,
}
impl ClaimCheck {
pub fn if_present(value: impl Into<String>) -> Self {
Self::IfPresent(value.into())
}
pub fn require_any(values: impl IntoIterator<Item = impl Into<String>>) -> Self {
Self::RequireAny(values.into_iter().map(Into::into).collect())
}
pub fn required_value(value: impl Into<String>) -> Self {
Self::RequiredValue(value.into())
}
#[must_use]
pub fn present() -> Self {
Self::Present
}
}