pub struct EnumBasetype { /* private fields */ }
Expand description

An enumeration base type.

Implementations

Create a new enumeration type.

Example
use moore_vhdl::ty2::{Type, EnumBasetype};

let ty = EnumBasetype::new(vec![
    "first".into(),
    "second".into(),
    '0'.into(),
    '1'.into(),
]);

assert_eq!(format!("{}", ty), "(first, second, '0', '1')");

Trait Implementations

Allocate a value of type T.

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

Convert to a type.

The variants of this enumeration type.

The range of variants this type can assume. Read more

The base type of this enumeration.

Returns Some if self is an EnumBasetype, None otherwise.

Check if two enumeration types are equal.

The resolution function associated with this type.

Returns Some if self is an EnumSubtype, None otherwise.

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

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

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

This method tests for !=.

Check if this is a scalar type. Read more

Check if this is a discrete type. Read more

Check if this is a numeric type. Read more

Check if this is a composite type. Read more

Converts from &Type to AnyType.

Convert into an owned type.

Clone this type.

Check if two types are equal.

Check if the type can be implicitly cast to another.

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)

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.