[−][src]Struct moore_vhdl::ty2::EnumBasetype
An enumeration base type.
Methods
impl EnumBasetype
[src]
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]
't: 'a,
fn alloc(&'a self, value: EnumBasetype) -> &'a mut EnumBasetype
[src]
impl Type for EnumBasetype
[src]
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
Self: 'a,
[src]
Self: 'a,
fn to_owned<'a>(&self) -> OwnedType<'a> where
Self: 'a,
[src]
Self: 'a,
fn is_equal(&self, other: &dyn Type) -> bool
[src]
fn is_implicitly_castable(&self, _into: &dyn Type) -> bool
[src]
impl EnumType for EnumBasetype
[src]
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]
fn as_subtype(&self) -> Option<&EnumSubtype>
[src]
fn unwrap_basetype(&self) -> &EnumBasetype
[src]
fn unwrap_subtype(&self) -> &EnumSubtype
[src]
impl Clone for EnumBasetype
[src]
fn clone(&self) -> EnumBasetype
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Eq for EnumBasetype
[src]
impl PartialEq<EnumBasetype> for EnumBasetype
[src]
fn eq(&self, other: &EnumBasetype) -> bool
[src]
fn ne(&self, other: &EnumBasetype) -> bool
[src]
impl Display for EnumBasetype
[src]
impl Debug for EnumBasetype
[src]
Auto Trait Implementations
impl Send for EnumBasetype
impl Sync for EnumBasetype
impl Unpin for EnumBasetype
impl UnwindSafe for EnumBasetype
impl RefUnwindSafe for EnumBasetype
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,