[][src]Struct moore_vhdl::ty2::EnumBasetype

pub struct EnumBasetype { /* fields omitted */ }

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]

impl Type for EnumBasetype
[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]

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 PartialEq<EnumBasetype> for EnumBasetype
[src]

impl Clone for 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 Display for EnumBasetype
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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.

impl<T> Any for T where
    T: 'static + ?Sized
[src]