pub enum Value {
Nil,
Object(NonNull<CaoLangObject>),
Integer(i64),
Real(f64),
}Variants§
Implementations§
Source§impl Value
impl Value
pub fn as_bool(self) -> bool
pub fn is_float(self) -> bool
Sourcepub unsafe fn as_table<'a>(self) -> Option<&'a CaoLangTable>
pub unsafe fn as_table<'a>(self) -> Option<&'a CaoLangTable>
pub fn as_int(self) -> Option<i64>
pub fn as_real(self) -> Option<f64>
pub fn is_obj(self) -> bool
pub fn is_integer(self) -> bool
pub fn is_null(self) -> bool
Trait Implementations§
Source§impl From<ObjectGcGuard> for Value
impl From<ObjectGcGuard> for Value
Source§fn from(value: ObjectGcGuard) -> Self
fn from(value: ObjectGcGuard) -> Self
Converts to this type from the input type.
Source§impl PartialOrd for Value
impl PartialOrd for Value
Source§impl TryFrom<Value> for &CaoLangTable
impl TryFrom<Value> for &CaoLangTable
Source§impl TryFrom<Value> for &mut CaoLangTable
impl TryFrom<Value> for &mut CaoLangTable
Source§impl TryFrom<Value> for OwnedValue
impl TryFrom<Value> for OwnedValue
impl Copy for Value
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