Object

Trait Object 

Source
pub trait Object: Any + Debug {
Show 22 methods // Provided methods fn debug(&self, f: &mut Formatter<'_>) -> Result { ... } fn add(&self, other: &Value) -> Result<Value, RuntimeError> { ... } fn sub(&self, other: &Value) -> Result<Value, RuntimeError> { ... } fn mul(&self, other: &Value) -> Result<Value, RuntimeError> { ... } fn div(&self, other: &Value) -> Result<Value, RuntimeError> { ... } fn modulo(&self, other: &Value) -> Result<Value, RuntimeError> { ... } fn pow(&self, other: &Value) -> Result<Value, RuntimeError> { ... } fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError> { ... } fn logic_and(&self, other: &Value) -> Result<Value, RuntimeError> { ... } fn logic_or(&self, other: &Value) -> Result<Value, RuntimeError> { ... } fn negate(&self) -> Result<Value, RuntimeError> { ... } fn call(&mut self, args: &[ValueRef]) -> Result<Option<Value>, RuntimeError> { ... } fn index_get(&self, index: &Value) -> Result<ValueRef, RuntimeError> { ... } fn index_set( &mut self, index: &Value, value: ValueRef, ) -> Result<(), RuntimeError> { ... } fn property_get(&self, member: &str) -> Result<ValueRef, RuntimeError> { ... } fn property_set( &mut self, member: &str, value: ValueRef, ) -> Result<(), RuntimeError> { ... } fn property_call( &mut self, member: &str, args: &[ValueRef], ) -> Result<Option<Value>, RuntimeError> { ... } fn make_iterator( &self, ) -> Result<Box<dyn Iterator<Item = ValueRef>>, RuntimeError> { ... } fn iterator_has_next(&self) -> Result<bool, RuntimeError> { ... } fn iterate_next(&mut self) -> Result<ValueRef, RuntimeError> { ... } fn make_slice(&self, range: ValueRef) -> Result<Value, RuntimeError> { ... } fn into_future( self: Box<Self>, ) -> Result<Box<dyn Future<Output = Value> + Unpin + Send + 'static>, RuntimeError> { ... }
}

Provided Methods§

Source

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

arithmetic addition operation

Source

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

arithmetic subtraction operation

Source

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

arithmetic multiplication operation

Source

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

arithmetic division operation

Source

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

arithmetic modulo operation

Source

fn pow(&self, other: &Value) -> Result<Value, RuntimeError>

arithmetic power operation

Source

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

compare operation

Source

fn logic_and(&self, other: &Value) -> Result<Value, RuntimeError>

logic and operation

Source

fn logic_or(&self, other: &Value) -> Result<Value, RuntimeError>

logic or operation

Source

fn negate(&self) -> Result<Value, RuntimeError>

negate operation

Source

fn call(&mut self, args: &[ValueRef]) -> Result<Option<Value>, RuntimeError>

Source

fn index_get(&self, index: &Value) -> Result<ValueRef, RuntimeError>

index get operation

Source

fn index_set( &mut self, index: &Value, value: ValueRef, ) -> Result<(), RuntimeError>

Source

fn property_get(&self, member: &str) -> Result<ValueRef, RuntimeError>

Source

fn property_set( &mut self, member: &str, value: ValueRef, ) -> Result<(), RuntimeError>

Source

fn property_call( &mut self, member: &str, args: &[ValueRef], ) -> Result<Option<Value>, RuntimeError>

Source

fn make_iterator( &self, ) -> Result<Box<dyn Iterator<Item = ValueRef>>, RuntimeError>

Source

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

Source

fn iterate_next(&mut self) -> Result<ValueRef, RuntimeError>

Source

fn make_slice(&self, range: ValueRef) -> Result<Value, RuntimeError>

Source

fn into_future( self: Box<Self>, ) -> Result<Box<dyn Future<Output = Value> + Unpin + Send + 'static>, RuntimeError>

Implementations on Foreign Types§

Source§

impl Object for &'static str

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

impl Object for (ValueRef, ValueRef)

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn index_get(&self, index: &Value) -> Result<ValueRef, RuntimeError>

Source§

impl Object for bool

Source§

impl Object for char

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

impl Object for f32

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for f64

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for i8

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for i16

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for i32

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for i64

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for isize

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for u8

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for u16

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for u32

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for u64

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for ()

()

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

impl Object for usize

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn sub(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn mul(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn div(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn modulo(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn negate(&self) -> Result<Value, RuntimeError>

Source§

impl Object for String

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn compare(&self, other: &Value) -> Result<Ordering, RuntimeError>

Source§

fn add(&self, other: &Value) -> Result<Value, RuntimeError>

Source§

fn make_iterator( &self, ) -> Result<Box<dyn Iterator<Item = ValueRef>>, RuntimeError>

Source§

fn make_slice(&self, range: ValueRef) -> Result<Value, RuntimeError>

Source§

impl Object for Vec<ValueRef>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn index_get(&self, index: &Value) -> Result<ValueRef, RuntimeError>

Source§

fn index_set( &mut self, index: &Value, value: ValueRef, ) -> Result<(), RuntimeError>

Source§

fn make_iterator( &self, ) -> Result<Box<dyn Iterator<Item = ValueRef>>, RuntimeError>

Source§

fn make_slice(&self, range: ValueRef) -> Result<Value, RuntimeError>

Source§

fn property_call( &mut self, member: &str, args: &[ValueRef], ) -> Result<Option<Value>, RuntimeError>

Source§

impl<K> Object for HashMap<K, ValueRef>
where K: Object + Hash + Eq + Clone,

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn index_get(&self, index: &Value) -> Result<ValueRef, RuntimeError>

Source§

fn index_set( &mut self, index: &Value, value: ValueRef, ) -> Result<(), RuntimeError>

Source§

fn make_iterator( &self, ) -> Result<Box<dyn Iterator<Item = ValueRef>>, RuntimeError>

Source§

impl<K, V> Object for HashMap<K, V>
where K: Object + Hash + Eq + Clone, V: Object + Clone,

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn index_get(&self, index: &Value) -> Result<ValueRef, RuntimeError>

Source§

fn index_set( &mut self, index: &Value, value: ValueRef, ) -> Result<(), RuntimeError>

Source§

impl<T1, T2> Object for (T1, T2)
where T1: Object + Clone, T2: Object + Clone,

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn index_get(&self, index: &Value) -> Result<ValueRef, RuntimeError>

Source§

impl<T: Object + Clone> Object for Vec<T>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result

Source§

fn index_get(&self, index: &Value) -> Result<ValueRef, RuntimeError>

Source§

fn index_set( &mut self, index: &Value, value: ValueRef, ) -> Result<(), RuntimeError>

Source§

fn make_iterator( &self, ) -> Result<Box<dyn Iterator<Item = ValueRef>>, RuntimeError>

Source§

fn make_slice(&self, range: ValueRef) -> Result<Value, RuntimeError>

Source§

fn property_call( &mut self, member: &str, args: &[ValueRef], ) -> Result<Option<Value>, RuntimeError>

Implementors§