Enum dyon::ty::Type
[−]
[src]
pub enum Type { Unreachable, Void, Any, Bool, F64, Vec4, Text, Link, Array(Box<Type>), Object, Option(Box<Type>), Result(Box<Type>), Secret(Box<Type>), Thread(Box<Type>), AdHoc(Arc<String>, Box<Type>), Closure(Box<Dfn>), }
Variants
Unreachable
Whether a statement is never reached.
Void
Any
Bool
F64
Vec4
Text
Link
Array(Box<Type>)
Object
Option(Box<Type>)
Result(Box<Type>)
Secret(Box<Type>)
Thread(Box<Type>)
AdHoc(Arc<String>, Box<Type>)
Closure(Box<Dfn>)
Methods
impl Type
[src]
fn description(&self) -> String
fn array() -> Type
fn object() -> Type
fn option() -> Type
fn result() -> Type
fn thread() -> Type
fn goes_with(&self, other: &Type) -> bool
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.
fn add(&self, other: &Type) -> Option<Type>
fn add_assign(&self, other: &Type) -> bool
fn mul(&self, other: &Type, binop: BinOp) -> Option<Type>
fn pow(&self, other: &Type) -> Option<Type>
fn from_meta_data(node: &str,
convert: Convert,
ignored: &mut Vec<Range>)
-> Result<(Range, Type), ()>
convert: Convert,
ignored: &mut Vec<Range>)
-> Result<(Range, Type), ()>
Trait Implementations
impl Debug for Type
[src]
impl Clone for Type
[src]
fn clone(&self) -> Type
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more