[−][src]Enum dyon::Type
Stores a Dyon type.
Variants
Unreachable
Whether a statement is never reached.
Void
A no-type.
Any
Any type.
Bool
Boolean type.
F64
F64 type.
Vec4
4D vector type.
Mat4
4D matrix type.
Text
String/text type.
Link
Link type.
Array(Box<Type>)
Array type.
Object
Object type.
Option(Box<Type>)
Option type.
Result(Box<Type>)
Result type.
Secret(Box<Type>)
Secret type.
Thread(Box<Type>)
Thread handle type.
In(Box<Type>)
In-type.
AdHoc(Arc<String>, Box<Type>)
Ad-hoc type.
Closure(Box<Dfn>)
Closure type.
Methods
impl Type
[src]
impl Type
pub fn description(&self) -> String | [src] |
Returns description of the type.
pub fn array() -> Type | [src] |
Returns an array type with an any
as inner type.
pub fn object() -> Type | [src] |
Returns an object type.
pub fn option() -> Type | [src] |
Returns an Option type with an any
as inner type.
pub fn result() -> Type | [src] |
Returns a Result type with an any
as inner type.
pub fn thread() -> Type | [src] |
Returns a thread handle type with an any
as inner type.
pub fn in_ty() -> Type | [src] |
Returns an in-type with an any
as inner type.
pub fn goes_with(&self, other: &Type) -> bool | [src] |
Returns true
if a type goes with another type (directional check).
bool
(argument) goes withsec[bool]
(value)f64
(argument) goes withsec[f64]
(value)
The opposite is not true, since sec
contains extra information.
pub fn add(&self, other: &Type) -> Option<Type> | [src] |
Infers type from the +
operator.
pub fn add_assign(&self, other: &Type) -> bool | [src] |
Infers type from the +=
operator.
pub fn mul(&self, other: &Type, binop: BinOp) -> Option<Type> | [src] |
Infers type from the *
binary operator.
pub fn pow(&self, other: &Type) -> Option<Type> | [src] |
Infers type from the ^
binary operator.
pub fn from_meta_data( | [src] |
Converts meta data into a type.
Trait Implementations
impl PartialEq<Type> for Type
[src]
impl PartialEq<Type> for Type
impl Clone for Type
[src]
impl Clone for Type
fn clone(&self) -> Type | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Debug for Type
[src]
impl Debug for Type
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Typeable for T where
T: Any,
impl<T> Typeable for T where
T: Any,