Enum adana_script_core::Value
source · pub enum Value {
Show 33 variants
Break,
EarlyReturn(Box<Option<Value>>),
Drop(Box<Value>),
Expression(Vec<Value>),
ImplicitMultiply(Box<Value>),
Operation(Operator),
BuiltInFunction {
fn_type: BuiltInFunctionType,
expr: Box<Value>,
},
Function {
parameters: Box<Value>,
exprs: Vec<Value>,
},
FunctionCall {
parameters: Box<Value>,
function: Box<Value>,
},
Null,
Decimal(f64),
U8(u8),
I8(i8),
Integer(i128),
Bool(bool),
Range {
start: Box<Value>,
incl_both_end: bool,
end: Box<Value>,
},
NoOp,
String(String),
FString(String, Vec<(String, Value)>),
BlockParen(Vec<Value>),
Variable(String),
VariableRef(String),
VariableUnused,
Const(char),
VariableNegate(String),
VariableExpr {
name: Box<Value>,
expr: Box<Value>,
},
IfExpr {
cond: Box<Value>,
exprs: Vec<Value>,
else_expr: Option<Vec<Value>>,
},
WhileExpr {
cond: Box<Value>,
exprs: Vec<Value>,
},
ForeachExpr {
var: String,
index_var: Option<String>,
iterator: Box<Value>,
exprs: Vec<Value>,
},
Array(Vec<Value>),
ArrayAccess {
arr: Box<Value>,
index: Box<Value>,
},
Struct(BTreeMap<String, Value>),
StructAccess {
struc: Box<Value>,
key: String,
},
}
Variants§
Break
EarlyReturn(Box<Option<Value>>)
Drop(Box<Value>)
Expression(Vec<Value>)
ImplicitMultiply(Box<Value>)
Operation(Operator)
BuiltInFunction
Function
FunctionCall
Null
Decimal(f64)
U8(u8)
I8(i8)
Integer(i128)
Bool(bool)
Range
NoOp
String(String)
FString(String, Vec<(String, Value)>)
BlockParen(Vec<Value>)
Variable(String)
VariableRef(String)
VariableUnused
Const(char)
VariableNegate(String)
VariableExpr
IfExpr
WhileExpr
ForeachExpr
Array(Vec<Value>)
ArrayAccess
Struct(BTreeMap<String, Value>)
StructAccess
Trait Implementations§
source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Value
impl PartialEq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more