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

pub trait PhysicalType: Type {
    pub fn as_type(&self) -> &dyn Type;
pub fn range(&self) -> &Range<BigInt>;
pub fn units(&self) -> &[PhysicalUnit]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
;
pub fn primary_index(&self) -> usize;
pub fn base_type(&self) -> &dyn Type;
pub fn is_equal(&self, other: &dyn PhysicalType) -> bool; pub fn resolution_func(&self) -> Option<usize> { ... }
pub fn as_basetype(&self) -> Option<&PhysicalBasetype> { ... }
pub fn as_subtype(&self) -> Option<&PhysicalSubtype<'_>> { ... }
pub fn unwrap_basetype(&self) -> &PhysicalBasetype { ... }
pub fn unwrap_subtype(&self) -> &PhysicalSubtype<'_> { ... } }

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]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[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.

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

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