pub enum Value {
Show 18 variants
None,
Bool(bool),
Int(i64),
Float(f64),
String(Arc<String>),
List(Arc<RwLock<Vec<Value>>>),
Dict(Arc<RwLock<IndexMap<String, Value>>>),
Set(Arc<RwLock<IndexSet<Value>>>),
Tuple(Arc<Vec<Value>>),
Function(Arc<UserFunction>),
Lambda(Arc<LambdaFunction>),
NativeFunction(Arc<NativeFunction>),
Response(Arc<HttpResponse>),
ProcessResult(Arc<ProcessResult>),
Iterator(Arc<StreamIterator>),
Generator(Arc<Generator>),
StructType(Arc<StructType>),
StructInstance(Arc<StructInstance>),
}Variants§
None
Bool(bool)
Int(i64)
Float(f64)
String(Arc<String>)
List(Arc<RwLock<Vec<Value>>>)
Dict(Arc<RwLock<IndexMap<String, Value>>>)
Set(Arc<RwLock<IndexSet<Value>>>)
Tuple(Arc<Vec<Value>>)
Function(Arc<UserFunction>)
Lambda(Arc<LambdaFunction>)
NativeFunction(Arc<NativeFunction>)
Response(Arc<HttpResponse>)
ProcessResult(Arc<ProcessResult>)
Iterator(Arc<StreamIterator>)
Generator(Arc<Generator>)
StructType(Arc<StructType>)
StructInstance(Arc<StructInstance>)
Implementations§
Source§impl Value
impl Value
pub fn type_name(&self) -> &'static str
pub fn is_truthy(&self) -> bool
pub async fn is_truthy_async(&self) -> bool
pub fn is_none(&self) -> bool
pub async fn deep_copy(&self) -> Value
pub fn as_bool(&self) -> Result<bool>
pub fn as_int(&self) -> Result<i64>
pub fn as_float(&self) -> Result<f64>
pub fn as_string(&self) -> Result<String>
pub fn as_str(&self) -> Result<&str>
pub fn to_display_string(&self) -> String
pub fn repr(&self) -> String
pub fn get_attr(&self, name: &str) -> Option<Value>
pub fn has_attr(&self, name: &str) -> bool
Trait Implementations§
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.