[][src]Trait moore_vhdl::ty2::PhysicalType

pub trait PhysicalType: Type {
    fn as_type(&self) -> &dyn Type;
fn range(&self) -> &Range<BigInt>;
fn units(&self) -> &[PhysicalUnit];
fn primary_index(&self) -> usize;
fn base_type(&self) -> &dyn Type;
fn is_equal(&self, other: &dyn PhysicalType) -> bool; fn resolution_func(&self) -> Option<usize> { ... }
fn as_basetype(&self) -> Option<&PhysicalBasetype> { ... }
fn as_subtype(&self) -> Option<&PhysicalSubtype> { ... }
fn unwrap_basetype(&self) -> &PhysicalBasetype { ... }
fn unwrap_subtype(&self) -> &PhysicalSubtype { ... } }

A physical type.

This can either be an PhysicalBasetype or a PhysicalSubtype.

Required methods

fn as_type(&self) -> &dyn Type

Convert to a type.

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

The range of values this physical type can assume.

fn units(&self) -> &[PhysicalUnit]

The units of measure of this type.

fn primary_index(&self) -> usize

The index of the primary unit.

fn base_type(&self) -> &dyn Type

The base type of this physical type.

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

Check if two physical 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<&PhysicalBasetype>

Returns Some if self is a PhysicalBasetype, None otherwise.

fn as_subtype(&self) -> Option<&PhysicalSubtype>

Returns Some if self is a PhysicalSubtype, None otherwise.

fn unwrap_basetype(&self) -> &PhysicalBasetype

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

fn unwrap_subtype(&self) -> &PhysicalSubtype

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

Loading content...

Trait Implementations

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

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

Implementors

impl PhysicalType for PhysicalBasetype[src]

impl<'t> PhysicalType for PhysicalSubtype<'t>[src]

Loading content...