Trait OnionObjectExt

Source
pub trait OnionObjectExt:
    GCTraceable<OnionObjectCell>
    + Debug
    + Send
    + Sync
    + 'static {
Show 35 methods // Required methods fn as_any(&self) -> &dyn Any; fn upgrade(&self, collected: &mut Vec<GCArc<OnionObjectCell>>); fn reconstruct_container(&self) -> Result<OnionObject, RuntimeError>; fn equals(&self, other: &OnionObject) -> Result<bool, RuntimeError>; fn is_same(&self, other: &OnionObject) -> Result<bool, RuntimeError>; // Provided methods fn to_integer(&self) -> Result<i64, RuntimeError> { ... } fn to_float(&self) -> Result<f64, RuntimeError> { ... } fn to_string( &self, ptrs: &Vec<*const OnionObject>, ) -> Result<String, RuntimeError> { ... } fn to_bytes(&self) -> Result<Vec<u8>, RuntimeError> { ... } fn to_boolean(&self) -> Result<bool, RuntimeError> { ... } fn repr( &self, ptrs: &Vec<*const OnionObject>, ) -> Result<String, RuntimeError> { ... } fn type_of(&self) -> Result<String, RuntimeError> { ... } fn len(&self) -> Result<OnionStaticObject, RuntimeError> { ... } fn contains(&self, other: &OnionObject) -> Result<bool, RuntimeError> { ... } fn at(&self, index: i64) -> Result<OnionStaticObject, RuntimeError> { ... } fn key_of(&self) -> Result<OnionStaticObject, RuntimeError> { ... } fn value_of(&self) -> Result<OnionStaticObject, RuntimeError> { ... } fn with_attribute( &self, key: &OnionObject, f: &mut dyn FnMut(&OnionObject) -> Result<(), RuntimeError>, ) -> Result<(), RuntimeError> { ... } fn binary_eq(&self, other: &OnionObject) -> Result<bool, RuntimeError> { ... } fn binary_lt(&self, other: &OnionObject) -> Result<bool, RuntimeError> { ... } fn binary_gt(&self, other: &OnionObject) -> Result<bool, RuntimeError> { ... } fn binary_add( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_sub( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_mul( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_div( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_mod( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_pow( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_and( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_or( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_xor( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_shl( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn binary_shr( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError> { ... } fn unary_neg(&self) -> Result<OnionStaticObject, RuntimeError> { ... } fn unary_plus(&self) -> Result<OnionStaticObject, RuntimeError> { ... } fn unary_not(&self) -> Result<OnionStaticObject, RuntimeError> { ... }
}

Required Methods§

Provided Methods§

Source

fn to_integer(&self) -> Result<i64, RuntimeError>

Source

fn to_float(&self) -> Result<f64, RuntimeError>

Source

fn to_string( &self, ptrs: &Vec<*const OnionObject>, ) -> Result<String, RuntimeError>

Source

fn to_bytes(&self) -> Result<Vec<u8>, RuntimeError>

Source

fn to_boolean(&self) -> Result<bool, RuntimeError>

Source

fn repr(&self, ptrs: &Vec<*const OnionObject>) -> Result<String, RuntimeError>

Source

fn type_of(&self) -> Result<String, RuntimeError>

Source

fn len(&self) -> Result<OnionStaticObject, RuntimeError>

Source

fn contains(&self, other: &OnionObject) -> Result<bool, RuntimeError>

Source

fn at(&self, index: i64) -> Result<OnionStaticObject, RuntimeError>

Source

fn key_of(&self) -> Result<OnionStaticObject, RuntimeError>

Source

fn value_of(&self) -> Result<OnionStaticObject, RuntimeError>

Source

fn with_attribute( &self, key: &OnionObject, f: &mut dyn FnMut(&OnionObject) -> Result<(), RuntimeError>, ) -> Result<(), RuntimeError>

Source

fn binary_eq(&self, other: &OnionObject) -> Result<bool, RuntimeError>

Source

fn binary_lt(&self, other: &OnionObject) -> Result<bool, RuntimeError>

Source

fn binary_gt(&self, other: &OnionObject) -> Result<bool, RuntimeError>

Source

fn binary_add( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_sub( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_mul( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_div( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_mod( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_pow( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_and( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_or( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_xor( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_shl( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn binary_shr( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

fn unary_neg(&self) -> Result<OnionStaticObject, RuntimeError>

Source

fn unary_plus(&self) -> Result<OnionStaticObject, RuntimeError>

Source

fn unary_not(&self) -> Result<OnionStaticObject, RuntimeError>

Implementors§