pub struct TypeMark<'t> { /* fields omitted */ }
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_vhdl::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.
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.
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts the given value to a String
. Read more
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
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)