[−][src]Enum moore_vhdl::ty2::AnyType
A type.
This enum represents one of the types declared in this module. It is useful in code that needs to know exactly what type it is operating on, for example in a match expression. This is the root of the entire type system. If a user declares a type, this enum carries the information as to which type was declared.
Variants
Enum(&'t dyn EnumType)
Integer(&'t dyn IntegerType)
Floating(&'t dyn FloatingType)
Physical(&'t dyn PhysicalType)
Array(&'t ArrayType<'t>)
Access(&'t AccessType<'t>)
Implementations
impl<'t> AnyType<'t>
[src]
pub fn as_type(self) -> &'t dyn Type
[src]
Perform type erasure.
pub fn as_enum(self) -> Option<&'t dyn EnumType>
[src]
Returns Some(t)
if the type is Enum(t)
, None
otherwise.
pub fn as_integer(self) -> Option<&'t dyn IntegerType>
[src]
Returns Some(t)
if the type is Integer(t)
, None
otherwise.
pub fn as_floating(self) -> Option<&'t dyn FloatingType>
[src]
Returns Some(t)
if the type is Floating(t)
, None
otherwise.
pub fn as_physical(self) -> Option<&'t dyn PhysicalType>
[src]
Returns Some(t)
if the type is Physical(t)
, None
otherwise.
pub fn as_array(self) -> Option<&'t ArrayType<'t>>
[src]
Returns Some(t)
if the type is Array(t)
, None
otherwise.
pub fn as_access(self) -> Option<&'t AccessType<'t>>
[src]
Returns Some(t)
if the type is Access(t)
, None
otherwise.
pub fn is_null(self) -> bool
[src]
Checks if the type is Null
.
pub fn is_universal_integer(self) -> bool
[src]
Checks if the type is UniversalInteger
.
pub fn is_universal_real(self) -> bool
[src]
Checks if the type is UniversalReal
.
pub fn unwrap_enum(self) -> &'t dyn EnumType
[src]
Returns an &EnumType
or panics if the type is not Enum
.
pub fn unwrap_integer(self) -> &'t dyn IntegerType
[src]
Returns an &IntegerType
or panics if the type is not Integer
.
pub fn unwrap_floating(self) -> &'t dyn FloatingType
[src]
Returns an &FloatingType
or panics if the type is not Floating
.
pub fn unwrap_physical(self) -> &'t dyn PhysicalType
[src]
Returns an &PhysicalType
or panics if the type is not Physical
.
pub fn unwrap_array(self) -> &'t ArrayType<'t>
[src]
Returns an &ArrayType
or panics if the type is not Array
.
pub fn unwrap_access(self) -> &'t AccessType<'t>
[src]
Returns an &AccessType
or panics if the type is not Access
.
pub fn is_scalar(&self) -> bool
[src]
Check if this is a scalar type.
pub fn is_discrete(&self) -> bool
[src]
Check if this is a discrete type.
pub fn is_numeric(&self) -> bool
[src]
Check if this is a numeric type.
pub fn is_composite(&self) -> bool
[src]
Check if this is a composite type.
pub fn to_owned(&self) -> OwnedType<'t>
[src]
Clone this type.
Trait Implementations
impl<'t> Clone for AnyType<'t>
[src]
impl<'t> Copy for AnyType<'t>
[src]
impl<'t> Debug for AnyType<'t>
[src]
impl<'t> Display for AnyType<'t>
[src]
impl<'t> PartialEq<AnyType<'t>> for AnyType<'t>
[src]
impl<'t> StructuralPartialEq for AnyType<'t>
[src]
Auto Trait Implementations
impl<'t> !RefUnwindSafe for AnyType<'t>
impl<'t> !Send for AnyType<'t>
impl<'t> !Sync for AnyType<'t>
impl<'t> Unpin for AnyType<'t>
impl<'t> !UnwindSafe for AnyType<'t>
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>,