Struct moore_vhdl::ty2::EnumBasetype [−][src]
pub struct EnumBasetype { /* fields omitted */ }
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
.
The variants of this enumeration type.
Returns Some
if self is an EnumBasetype
, None
otherwise.
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 !=
.
Auto Trait Implementations
impl RefUnwindSafe for EnumBasetype
impl Send for EnumBasetype
impl Sync for EnumBasetype
impl Unpin for EnumBasetype
impl UnwindSafe for EnumBasetype
Blanket Implementations
Mutably borrows from an owned value. Read more