[][src]Enum moore_vhdl::ty2::TypeName

pub enum TypeName {
    Name(Name),
    Span(Span),
}

A type name.

Types can be declared by the user or be provided as a builtin. In the case of a user-defined type we would like to keep track of its Span for good error messages. Builtin types have no location we can refer to however, and we must rather keep track of the name directly.

Variants

Name(Name)

The name is defined through an internalized name.

Span(Span)

The name is defined through a span.

Methods

impl TypeName
[src]

pub fn to_string(self) -> String
[src]

Get the type name as a string.

pub fn as_name(self) -> Option<Name>
[src]

Get the type name as a Name.

Returns None if the type name is given through a Span.

pub fn as_span(self) -> Option<Span>
[src]

Get the type name as a Span.

Returns None if the type name is given as a Name.

Trait Implementations

impl From<Name> for TypeName
[src]

impl From<Span> for TypeName
[src]

impl Eq for TypeName
[src]

impl Copy for TypeName
[src]

impl Clone for TypeName
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<TypeName> for TypeName
[src]

impl Debug for TypeName
[src]

impl Hash for TypeName
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for TypeName
[src]

Auto Trait Implementations

impl Send for TypeName

impl Sync for TypeName

Blanket Implementations

impl<T> From for T
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[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, 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> Any for T where
    T: 'static + ?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.