[−][src]Struct moore_vhdl::ty2::EnumBasetype
An enumeration base type.
Methods
impl EnumBasetype
[src]
impl EnumBasetype
pub fn new<I: IntoIterator<Item = EnumVariant>>(lits: I) -> EnumBasetype | [src] |
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
impl<'a, 't> Alloc<'a, 'a, EnumBasetype> for TypeArena<'t> where
't: 'a,
[src]
impl<'a, 't> Alloc<'a, 'a, EnumBasetype> for TypeArena<'t> where
't: 'a,
fn alloc(&'a self, value: EnumBasetype) -> &'a mut EnumBasetype | [src] |
impl Type for EnumBasetype
[src]
impl Type for EnumBasetype
fn is_scalar(&self) -> bool | [src] |
fn is_discrete(&self) -> bool | [src] |
fn is_numeric(&self) -> bool | [src] |
fn is_composite(&self) -> bool | [src] |
fn as_any(&self) -> AnyType | [src] |
fn into_owned<'a>(self) -> OwnedType<'a> where | [src] |
fn to_owned<'a>(&self) -> OwnedType<'a> where | [src] |
fn is_equal(&self, other: &dyn Type) -> bool | [src] |
Check if two types are equal.
fn is_implicitly_castable(&self, _into: &dyn Type) -> bool | [src] |
Check if the type can be implicitly cast to another.
impl EnumType for EnumBasetype
[src]
impl EnumType for EnumBasetype
fn as_type(&self) -> &dyn Type | [src] |
fn variants(&self) -> &[EnumVariant] | [src] |
fn range(&self) -> Range<usize> | [src] |
fn base_type(&self) -> &dyn Type | [src] |
fn as_basetype(&self) -> Option<&EnumBasetype> | [src] |
fn is_equal(&self, other: &dyn EnumType) -> bool | [src] |
fn resolution_func(&self) -> Option<usize> | [src] |
The resolution function associated with this type.
fn as_subtype(&self) -> Option<&EnumSubtype> | [src] |
Returns Some
if self is an EnumSubtype
, None
otherwise.
fn unwrap_basetype(&self) -> &EnumBasetype | [src] |
Returns an &EnumBasetype
or panics if the type is not a basetype.
fn unwrap_subtype(&self) -> &EnumSubtype | [src] |
Returns an &EnumSubtype
or panics if the type is not a subtype.
impl Eq for EnumBasetype
[src]
impl Eq for EnumBasetype
impl PartialEq<EnumBasetype> for EnumBasetype
[src]
impl PartialEq<EnumBasetype> for EnumBasetype
fn eq(&self, other: &EnumBasetype) -> bool | [src] |
fn ne(&self, other: &EnumBasetype) -> bool | [src] |
impl Clone for EnumBasetype
[src]
impl Clone for EnumBasetype
fn clone(&self) -> EnumBasetype | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Debug for EnumBasetype
[src]
impl Debug for EnumBasetype
impl Display for EnumBasetype
[src]
impl Display for EnumBasetype
Auto Trait Implementations
impl Send for EnumBasetype
impl Send for EnumBasetype
impl Sync for EnumBasetype
impl Sync for EnumBasetype
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |