pub struct TypeMark<'t> { /* fields omitted */ }
Expand description
A type mark.
A TypeMark
associates a name with a type or subtype, but in a different
manner than TypeDecl
and SubtypeDecl
. It is useful as a tracker of how a
type was referred to in the source code. A TypeMark
represents a way of
naming a type that is familiar to the user and can be presented as is in a
diagnostic message.
use moore_vhdl::ty2::{Type, TypeMark, NullType};
use moore_common::name::get_name_table;
let ta = NullType;
let a = TypeMark::new(
get_name_table().intern("DATA", false),
&ta,
);
assert_eq!(format!("{}", a), "DATA");
Create a new type mark from a name and a type.
Get the name of the mark.
Get the type of the mark.
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.