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>), In(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>)
In(Box<Type>)
AdHoc(Arc<String>, Box<Type>)
Closure(Box<Dfn>)
Methods
impl Type
[src]
impl Type
pub fn description(&self) -> String
[src]
pub fn description(&self) -> String
pub fn array() -> Type
[src]
pub fn array() -> Type
pub fn object() -> Type
[src]
pub fn object() -> Type
pub fn option() -> Type
[src]
pub fn option() -> Type
pub fn result() -> Type
[src]
pub fn result() -> Type
pub fn thread() -> Type
[src]
pub fn thread() -> Type
pub fn in_ty() -> Type
[src]
pub fn in_ty() -> Type
pub fn goes_with(&self, other: &Type) -> bool
[src]
pub 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.
pub fn add(&self, other: &Type) -> Option<Type>
[src]
pub fn add(&self, other: &Type) -> Option<Type>
pub fn add_assign(&self, other: &Type) -> bool
[src]
pub fn add_assign(&self, other: &Type) -> bool
pub fn mul(&self, other: &Type, binop: BinOp) -> Option<Type>
[src]
pub fn mul(&self, other: &Type, binop: BinOp) -> Option<Type>
pub fn pow(&self, other: &Type) -> Option<Type>
[src]
pub fn pow(&self, other: &Type) -> Option<Type>
pub fn from_meta_data(
node: &str,
convert: Convert,
ignored: &mut Vec<Range>
) -> Result<(Range, Type), ()>
[src]
pub fn from_meta_data(
node: &str,
convert: Convert,
ignored: &mut Vec<Range>
) -> Result<(Range, Type), ()>
Trait Implementations
impl Debug for Type
[src]
impl Debug for Type
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Type
[src]
impl Clone for Type
fn clone(&self) -> Type
[src]
fn clone(&self) -> Type
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for Type
[src]
impl PartialEq for Type