pub struct TypeDecl<'t> { /* fields omitted */ }
Expand description
A type declaration.
A TypeDecl
associates a name with a type. It is useful as a tracker of how
a type was called upon its definition, and where it was defined.
use moore_vhdl::ty2::{Type, TypeDecl, IntegerBasetype, Range};
use moore_common::name::get_name_table;
let ta = IntegerBasetype::new(Range::descending(31, 0));
let a = TypeDecl::new(
get_name_table().intern("DATA", false),
&ta,
);
assert_eq!(format!("{}", a), "type DATA is 31 downto 0");
Create a new type declaration from a name and a type.
Get the name of the declared type.
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 !=
.
Convert into an owned type.
Converts from &Type
to AnyType
.
Check if two types are equal.
Check if the type can be implicitly cast to another.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. 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.
The type returned in the event of a conversion error.