Struct moore_svlog::ty::UnpackedType[][src]

pub struct UnpackedType<'a> {
    pub core: UnpackedCore<'a>,
    pub dims: Vec<UnpackedDim<'a>>,
    // some fields omitted
}
Expand description

An unpacked type.

Fields

core: UnpackedCore<'a>

The core unpacked type.

dims: Vec<UnpackedDim<'a>>

The unpacked dimensions.

Implementations

Create a new type with no unpacked dimensions.

This creates the type on the stack. In general you will want to use the make_* functions to create a type that is interned into a context.

Create a new type with unpacked dimensions.

This creates the type on the stack. In general you will want to use the make_* functions to create a type that is interned into a context.

Create an interned type with no unpacked dimensions.

Create an interned type with unpacked dimensions.

Create a tombstone.

Create a void type.

Create a logic type.

Create a time type.

Internalize this type in a context and resolve it.

Resolve one level of name or type reference indirection.

For example, given typedef int foo; typedef foo bar;, resolves bar to foo.

Resolve all name or type reference indirections recursively.

For example, given typedef int foo; typedef foo bar;, resolves bar to int.

Check if this is a tombstone.

Check if this type is equal to another one.

Types which coalesce to iN in LLHD are checked for equality of their SBVT.

Check if this type is strictly equal to another one.

Check if this type is strictly a packed type.

If this type is strictly a packed type, convert it.

Get the domain for this type.

Get the sign for this type.

Compute the size of this type in bits.

Returns None if one of the type’s dimensions is unsized, associative, or a queue, or the core type has no known size.

Check if this type is trivially a SBVT.

Check if this type is an integer atom type, like int.

Check if this type is a single bit type, like bit.

Check if this type is a string, like string.

Check if this type will coalesce to a scalar type in LLHD, like i42.

Convert this type into an SBVT if possible.

Convert this type into an SBVT, or report a bug with the given span.

Get an iterator over the type’s packed dimensions, slowest-varying first.

For example, produces [3:0], [7:0] for bit [3:0][7:0] $ [1][2].

Get an iterator over the type’s unpacked dimensions, slowest-varying first.

For example, produces [1], [2] for bit [3:0][7:0] $ [1][2].

Get an iterator over the type’s dimensions. slowest-varying first.

For example, produces [1], [2], [3:0], [7:0] for bit [3:0][7:0] $ [1][2].

Pop the outermost dimension off the type.

For example, maps bit $ [1][2] to bit $ [2]. Pops off the packed type as well, mapping bit [7:0] $ to bit $.

Replace the outermost dimension of the type.

Panics if the type has no dimensions, or a packed dimension is replaced with an unpacked dimension, or vice-versa.

Get the outermost dimension of the type.

For example, yields the [1] in bit $ [1][2].

Get the underlying struct, or None if the type is no struct.

Get the underlying enum, or None if the type is no enum.

Get the underlying module, or None if the type is not a module.

Get the underlying interface, or None if the type is not a interface.

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

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

This method tests for !=.

Walk a visitor over self.

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.