[−][src]Trait moore_vhdl::ty2::PhysicalType
A physical type.
This can either be an PhysicalBasetype
or a PhysicalSubtype
.
Required methods
pub fn as_type(&self) -> &dyn Type
[src]
Convert to a type.
pub fn range(&self) -> &Range<BigInt>
[src]
The range of values this physical type can assume.
pub fn units(&self) -> &[PhysicalUnit]ⓘ
[src]
The units of measure of this type.
pub fn primary_index(&self) -> usize
[src]
The index of the primary unit.
pub fn base_type(&self) -> &dyn Type
[src]
The base type of this physical type.
pub fn is_equal(&self, other: &dyn PhysicalType) -> bool
[src]
Check if two physical types are equal.
Provided methods
pub fn resolution_func(&self) -> Option<usize>
[src]
The resolution function associated with this type.
pub fn as_basetype(&self) -> Option<&PhysicalBasetype>
[src]
Returns Some
if self is a PhysicalBasetype
, None
otherwise.
pub fn as_subtype(&self) -> Option<&PhysicalSubtype<'_>>
[src]
Returns Some
if self is a PhysicalSubtype
, None
otherwise.
pub fn unwrap_basetype(&self) -> &PhysicalBasetype
[src]
Returns an &PhysicalBasetype
or panics if the type is not a basetype.
pub fn unwrap_subtype(&self) -> &PhysicalSubtype<'_>
[src]
Returns an &PhysicalSubtype
or panics if the type is not a subtype.