[][src]Trait moore_vhdl::ty2::Type

pub trait Type: Debug + Display {
    pub fn is_scalar(&self) -> bool;
pub fn is_discrete(&self) -> bool;
pub fn is_numeric(&self) -> bool;
pub fn is_composite(&self) -> bool;
pub fn into_owned<'a>(self) -> OwnedType<'a>
    where
        Self: 'a
;
pub fn to_owned<'a>(&self) -> OwnedType<'a>
    where
        Self: 'a
;
pub fn as_any(&self) -> AnyType<'_>; pub fn is_equal(&self, other: &dyn Type) -> bool { ... }
pub fn is_implicitly_castable(&self, _into: &dyn Type) -> bool { ... } }

An interface for dealing with types.

This is the main type trait, which all types and subtypes implement.

Required methods

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

Check if this is a scalar type.

Enumeration, integer, floating-point, and physical types are scalar.

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

Check if this is a discrete type.

Enumeration and integer types are discrete.

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

Check if this is a numeric type.

Integer, floating-point, and physical types are numeric.

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

Check if this is a composite type.

Array and record types are composite.

pub fn into_owned<'a>(self) -> OwnedType<'a> where
    Self: 'a, 
[src]

Convert into an owned type.

pub fn to_owned<'a>(&self) -> OwnedType<'a> where
    Self: 'a, 
[src]

Clone this type.

pub fn as_any(&self) -> AnyType<'_>[src]

Converts from &Type to AnyType.

Loading content...

Provided methods

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

Check if two types are equal.

pub fn is_implicitly_castable(&self, _into: &dyn Type) -> bool[src]

Check if the type can be implicitly cast to another.

Loading content...

Trait Implementations

impl<'t> AllocOwned<'t, 't, dyn Type + 't> for TypeArena<'t>[src]

impl<'t> Borrow<dyn Type + 't> for OwnedType<'t>[src]

impl<'a> Eq for dyn Type + 'a[src]

impl<'a> PartialEq<dyn Type + 'a> for dyn Type + 'a[src]

impl<'t> ToOwned for dyn Type + 't[src]

type Owned = OwnedType<'t>

The resulting type after obtaining ownership.

Implementors

impl Type for EnumBasetype[src]

impl Type for FloatingBasetype[src]

impl Type for IntegerBasetype[src]

impl Type for NullType[src]

impl Type for PhysicalBasetype[src]

impl Type for UniversalIntegerType[src]

impl Type for UniversalRealType[src]

impl<'t> Type for AccessType<'t>[src]

impl<'t> Type for ArrayType<'t>[src]

impl<'t> Type for TypeDecl<'t>[src]

impl<'t> Type for TypeMark<'t>[src]

impl<'t> Type for EnumSubtype<'t>[src]

impl<'t> Type for FloatingSubtype<'t>[src]

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

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

Loading content...