Struct moore_vhdl::ty2::UniversalRealType
source · [−]pub struct UniversalRealType;
Expand description
A universal real.
This is not strictly a separate type, but rather defined by the standard as
the real type with the largest range. However since we can represent
arbitrary numbers as f64
, we use this special marker type.
Example
use moore_vhdl::ty2::{Type, UniversalRealType};
let ty = UniversalRealType;
assert_eq!(format!("{}", ty), "{universal real}");
assert_eq!(ty.is_scalar(), true);
assert_eq!(ty.is_discrete(), false);
assert_eq!(ty.is_numeric(), true);
Trait Implementations
sourceimpl Clone for UniversalRealType
impl Clone for UniversalRealType
sourcefn clone(&self) -> UniversalRealType
fn clone(&self) -> UniversalRealType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UniversalRealType
impl Debug for UniversalRealType
sourceimpl Display for UniversalRealType
impl Display for UniversalRealType
sourceimpl FloatingType for UniversalRealType
impl FloatingType for UniversalRealType
sourcefn is_universal(&self) -> bool
fn is_universal(&self) -> bool
Checks whether this is a universal real type.
sourcefn is_equal(&self, other: &dyn FloatingType) -> bool
fn is_equal(&self, other: &dyn FloatingType) -> bool
Check if two real types are equal.
sourcefn resolution_func(&self) -> Option<usize>
fn resolution_func(&self) -> Option<usize>
The resolution function associated with this type.
sourcefn as_basetype(&self) -> Option<&FloatingBasetype>
fn as_basetype(&self) -> Option<&FloatingBasetype>
Returns Some
if self is an FloatingBasetype
, None
otherwise.
sourcefn as_subtype(&self) -> Option<&FloatingSubtype<'_>>
fn as_subtype(&self) -> Option<&FloatingSubtype<'_>>
Returns Some
if self is an FloatingSubtype
, None
otherwise.
sourcefn unwrap_basetype(&self) -> &FloatingBasetype
fn unwrap_basetype(&self) -> &FloatingBasetype
Returns an &FloatingBasetype
or panics if the type is not a basetype.
sourcefn unwrap_subtype(&self) -> &FloatingSubtype<'_>
fn unwrap_subtype(&self) -> &FloatingSubtype<'_>
Returns an &FloatingSubtype
or panics if the type is not a subtype.
sourceimpl Type for UniversalRealType
impl Type for UniversalRealType
sourcefn is_discrete(&self) -> bool
fn is_discrete(&self) -> bool
Check if this is a discrete type. Read more
sourcefn is_numeric(&self) -> bool
fn is_numeric(&self) -> bool
Check if this is a numeric type. Read more
sourcefn is_composite(&self) -> bool
fn is_composite(&self) -> bool
Check if this is a composite type. Read more
sourcefn into_owned<'a>(self) -> OwnedType<'a> where
Self: 'a,
fn into_owned<'a>(self) -> OwnedType<'a> where
Self: 'a,
Convert into an owned type.
sourcefn is_implicitly_castable(&self, _into: &dyn Type) -> bool
fn is_implicitly_castable(&self, _into: &dyn Type) -> bool
Check if the type can be implicitly cast to another.
impl Copy for UniversalRealType
Auto Trait Implementations
impl RefUnwindSafe for UniversalRealType
impl Send for UniversalRealType
impl Sync for UniversalRealType
impl Unpin for UniversalRealType
impl UnwindSafe for UniversalRealType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more