pub enum Type {
Undefined,
Unresolved(String, Option<Position>),
Bool,
Int,
Real,
Enumerate(EnumerateId),
Interval(IntervalId),
IntInterval(i64, i64),
Function(Vec<Type>, Box<Type>),
}Variants§
Undefined
Unresolved(String, Option<Position>)
Bool
Int
Real
Enumerate(EnumerateId)
Interval(IntervalId)
IntInterval(i64, i64)
Function(Vec<Type>, Box<Type>)
Implementations§
Source§impl Type
impl Type
pub fn is_enumerate(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_integer(&self) -> bool
pub fn is_real(&self) -> bool
pub fn is_bounded(&self) -> bool
pub fn resolve(&self, types: &HashMap<String, Type>) -> Result<Type, Error>
pub fn get_type(&self, model: &Model) -> Type
pub fn is_subtype_of(&self, other: &Self) -> bool
pub fn is_compatible_with(&self, other: &Self) -> bool
pub fn common_type(&self, _model: &Model, other: &Self) -> Type
pub fn all(&self, model: &Model) -> Vec<Expr>
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more