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

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<'_> { ... } }

An integer type.

This can either be an IntegerBasetype or an IntegerSubtype.

Required methods

fn as_type(&self) -> &dyn Type

Convert to a type.

fn range(&self) -> Option<&Range<BigInt>>

The range of values this integer can assume.

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

fn base_type(&self) -> &dyn Type

The base type of this integer.

fn is_equal(&self, other: &dyn IntegerType) -> bool

Check if two integer types are equal.

Loading content...

Provided methods

fn resolution_func(&self) -> Option<usize>

The resolution function associated with this type.

fn as_basetype(&self) -> Option<&IntegerBasetype>

Returns Some if self is an IntegerBasetype, None otherwise.

fn as_subtype(&self) -> Option<&IntegerSubtype<'_>>

Returns Some if self is an IntegerSubtype, None otherwise.

fn is_universal(&self) -> bool

Checks whether this is a universal integer type.

fn unwrap_basetype(&self) -> &IntegerBasetype

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

fn unwrap_subtype(&self) -> &IntegerSubtype<'_>

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...