[][src]Trait moore_vhdl::ty2::IntegerType

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

An integer type.

This can either be an IntegerBasetype or an IntegerSubtype.

Required methods

pub fn as_type(&self) -> &dyn Type[src]

Convert to a type.

pub fn range(&self) -> Option<&Range<BigInt>>[src]

The range of values this integer can assume.

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

pub fn base_type(&self) -> &dyn Type[src]

The base type of this integer.

pub fn is_equal(&self, other: &dyn IntegerType) -> bool[src]

Check if two integer types are equal.

Loading content...

Provided methods

pub fn resolution_func(&self) -> Option<usize>[src]

The resolution function associated with this type.

pub fn as_basetype(&self) -> Option<&IntegerBasetype>[src]

Returns Some if self is an IntegerBasetype, None otherwise.

pub fn as_subtype(&self) -> Option<&IntegerSubtype<'_>>[src]

Returns Some if self is an IntegerSubtype, None otherwise.

pub fn is_universal(&self) -> bool[src]

Checks whether this is a universal integer type.

pub fn unwrap_basetype(&self) -> &IntegerBasetype[src]

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

pub fn unwrap_subtype(&self) -> &IntegerSubtype<'_>[src]

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

Loading content...

Trait Implementations

impl<'t> Eq for dyn IntegerType + 't[src]

impl<'t> PartialEq<dyn IntegerType + 't> for dyn IntegerType + 't[src]

Implementors

impl IntegerType for IntegerBasetype[src]

impl IntegerType for UniversalIntegerType[src]

impl<'t> IntegerType for IntegerSubtype<'t>[src]

Loading content...