use crate::scope::Scope;
pub trait GeneralClaims: core::fmt::Debug {
type Scope: Scope;
fn scope(&self) -> &Self::Scope;
fn time_constraint(&self) -> crate::time::TimeConstraint;
fn is_important(&self) -> bool {
false
}
}
impl GeneralClaims for core::convert::Infallible {
type Scope = core::convert::Infallible;
fn scope(&self) -> &Self::Scope {
self
}
fn time_constraint(&self) -> crate::time::TimeConstraint {
match *self {}
}
}
#[derive(Debug)]
pub struct Unlimited<S: Scope>(pub S);
impl<S: Scope> GeneralClaims for Unlimited<S> {
type Scope = S;
fn scope(&self) -> &Self::Scope {
&self.0
}
fn time_constraint(&self) -> crate::time::TimeConstraint {
crate::time::TimeConstraint::unbounded()
}
}