Enum moore_vhdl::ty2::AnyType[][src]

pub enum AnyType<'t> {
    Enum(&'t dyn EnumType),
    Integer(&'t dyn IntegerType),
    Floating(&'t dyn FloatingType),
    Physical(&'t dyn PhysicalType),
    Array(&'t ArrayType<'t>),
    Access(&'t AccessType<'t>),
    Null,
    UniversalInteger,
    UniversalReal,
}
Expand description

A type.

This enum represents one of the types declared in this module. It is useful in code that needs to know exactly what type it is operating on, for example in a match expression. This is the root of the entire type system. If a user declares a type, this enum carries the information as to which type was declared.

Variants

Enum(&'t dyn EnumType)

Tuple Fields of Enum

0: &'t dyn EnumType
Integer(&'t dyn IntegerType)

Tuple Fields of Integer

0: &'t dyn IntegerType
Floating(&'t dyn FloatingType)

Tuple Fields of Floating

0: &'t dyn FloatingType
Physical(&'t dyn PhysicalType)

Tuple Fields of Physical

0: &'t dyn PhysicalType
Array(&'t ArrayType<'t>)

Tuple Fields of Array

0: &'t ArrayType<'t>
Access(&'t AccessType<'t>)

Tuple Fields of Access

0: &'t AccessType<'t>
Null
UniversalInteger
UniversalReal

Implementations

Perform type erasure.

Returns Some(t) if the type is Enum(t), None otherwise.

Returns Some(t) if the type is Integer(t), None otherwise.

Returns Some(t) if the type is Floating(t), None otherwise.

Returns Some(t) if the type is Physical(t), None otherwise.

Returns Some(t) if the type is Array(t), None otherwise.

Returns Some(t) if the type is Access(t), None otherwise.

Checks if the type is Null.

Checks if the type is UniversalInteger.

Checks if the type is UniversalReal.

Returns an &EnumType or panics if the type is not Enum.

Returns an &IntegerType or panics if the type is not Integer.

Returns an &FloatingType or panics if the type is not Floating.

Returns an &PhysicalType or panics if the type is not Physical.

Returns an &ArrayType or panics if the type is not Array.

Returns an &AccessType or panics if the type is not Access.

Check if this is a scalar type.

Check if this is a discrete type.

Check if this is a numeric type.

Check if this is a composite type.

Clone this type.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.