pub trait IntegerType: Type {
    fn as_type(&self) -> &dyn Type;
fn range(&self) -> Option<&Range<BigInt>>;
fn base_type(&self) -> &dyn Type;
fn is_equal(&self, other: &dyn IntegerType) -> bool; fn resolution_func(&self) -> Option<usize> { ... }
fn as_basetype(&self) -> Option<&IntegerBasetype> { ... }
fn as_subtype(&self) -> Option<&IntegerSubtype<'_>> { ... }
fn is_universal(&self) -> bool { ... }
fn unwrap_basetype(&self) -> &IntegerBasetype { ... }
fn unwrap_subtype(&self) -> &IntegerSubtype<'_> { ... } }
Expand description

An integer type.

This can either be an IntegerBasetype or an IntegerSubtype.

Required methods

Convert to a type.

The range of values this integer can assume.

Universal integers return None here, as they do not have a value range associated with them.

The base type of this integer.

Check if two integer types are equal.

Provided methods

The resolution function associated with this type.

Returns Some if self is an IntegerBasetype, None otherwise.

Returns Some if self is an IntegerSubtype, None otherwise.

Checks whether this is a universal integer type.

Returns an &IntegerBasetype or panics if the type is not a basetype.

Returns an &IntegerSubtype or panics if the type is not a subtype.

Trait Implementations

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Implementors