[−][src]Enum moore_vhdl::ty2::TypeName
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.
Implementations
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 Clone for TypeName
[src]
impl Copy for TypeName
[src]
impl Debug for TypeName
[src]
impl Display for TypeName
[src]
impl Eq for TypeName
[src]
impl From<Name> for TypeName
[src]
impl From<Span> for TypeName
[src]
impl Hash for TypeName
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<TypeName> for TypeName
[src]
impl StructuralEq for TypeName
[src]
impl StructuralPartialEq for TypeName
[src]
Auto Trait Implementations
impl RefUnwindSafe for TypeName
impl Send for TypeName
impl Sync for TypeName
impl Unpin for TypeName
impl UnwindSafe for TypeName
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,