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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Convert to a type.

The range of values this real can assume. Read more

The base type of this real.

Checks whether this is a universal real type.

Check if two real types are equal.

The resolution function associated with this type.

Returns Some if self is an FloatingBasetype, None otherwise.

Returns Some if self is an FloatingSubtype, None otherwise.

Returns an &FloatingBasetype or panics if the type is not a basetype.

Returns an &FloatingSubtype or panics if the type is not a subtype.

Check if this is a scalar type. Read more

Check if this is a discrete type. Read more

Check if this is a numeric type. Read more

Check if this is a composite type. Read more

Converts from &Type to AnyType.

Convert into an owned type.

Clone this type.

Check if two types are equal.

Check if the type can be implicitly cast to another.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.