#[repr(C)]pub enum Primitive {
Show 18 variants
U8(u8),
I8(i8),
Int(i128),
Bool(bool),
Ref(RefPrimitive),
Null,
Double(f64),
String(String),
Array(Vec<Primitive>),
Struct(BTreeMap<String, Primitive>),
Error(String),
Function {
parameters: Vec<Value>,
exprs: Vec<Value>,
},
Unit,
NoReturn,
EarlyReturn(Box<Primitive>),
NativeLibrary(Arc<NativeLibrary>),
NativeFunction(String, Arc<NativeLibrary>),
LibData(LibData),
}
Variants§
U8(u8)
I8(i8)
Int(i128)
Bool(bool)
Ref(RefPrimitive)
Null
Double(f64)
String(String)
Array(Vec<Primitive>)
Struct(BTreeMap<String, Primitive>)
Error(String)
Function
Unit
NoReturn
EarlyReturn(Box<Primitive>)
NativeLibrary(Arc<NativeLibrary>)
NativeFunction(String, Arc<NativeLibrary>)
LibData(LibData)
Implementations§
Source§impl Primitive
impl Primitive
pub fn is_greater_than(&self, other: &Primitive) -> Primitive
pub fn is_greater_or_equal(&self, other: &Primitive) -> Primitive
pub fn is_less_than(&self, other: &Primitive) -> Primitive
pub fn is_less_or_equal(&self, other: &Primitive) -> Primitive
pub fn is_equal(&self, other: &Primitive) -> Primitive
pub fn as_ref_ok(&self) -> Result<&Primitive>
Trait Implementations§
Source§impl BitShift for Primitive
impl BitShift for Primitive
fn right_shift(&self, rhs: &Self) -> Self
fn left_shift(&self, rhs: &Self) -> Self
Source§impl<'de> Deserialize<'de> for Primitive
impl<'de> Deserialize<'de> for Primitive
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 Or for Primitive
impl Or for Primitive
fn or(&self, rhs: &Self) -> Self
fn bitwise_or(&self, rhs: &Self) -> Self
fn bitwise_xor(&self, rhs: &Self) -> Self
Source§impl PartialOrd for Primitive
impl PartialOrd for Primitive
Source§impl StringManipulation for Primitive
impl StringManipulation for Primitive
fn match_regex(&self, regex: &Primitive) -> Self
fn is_match(&self, regex: &Primitive) -> Self
fn replace(&self, regex: &Primitive, new_value: &Primitive) -> Self
fn replace_all(&self, regex: &Primitive, new_value: &Primitive) -> Self
fn to_upper(&self) -> Self
fn to_lower(&self) -> Self
fn capitalize(&self) -> Self
Auto Trait Implementations§
impl Freeze for Primitive
impl !RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl !UnwindSafe for Primitive
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