Trait hexagon::object::Object [] [src]

pub trait Object: Send {
    fn get_children(&self) -> Vec<usize>;
fn as_any(&self) -> &Any;
fn as_any_mut(&mut self) -> &mut Any; fn finalize(&self, _pool: &mut ObjectPool) { ... }
fn initialize(&mut self, _pool: &mut ObjectPool) { ... }
fn call(&self, _executor: &mut ExecutorImpl) -> Value { ... }
fn call_field(&self, field_name: &str, executor: &mut ExecutorImpl) -> Value { ... }
fn get_field(&self, _pool: &ObjectPool, _name: &str) -> Option<Value> { ... }
fn set_field(&self, _name: &str, _value_ref: Value) { ... }
fn must_get_field(&self, pool: &ObjectPool, name: &str) -> Value { ... }
fn has_const_field(&self, _pool: &ObjectPool, _name: &str) -> bool { ... }
fn compare(&self, _other: &ValueContext) -> Option<Ordering> { ... }
fn test_eq(&self, _other: &ValueContext) -> bool { ... }
fn typename(&self) -> &str { ... }
fn to_i64(&self) -> i64 { ... }
fn to_f64(&self) -> f64 { ... }
fn to_str(&self) -> &str { ... }
fn to_string(&self) -> String { ... }
fn to_bool(&self) -> bool { ... } }

A heap-allocated object.

This is the core abstraction in the Hexagon VM type system. After creating, an object must be pinned to the object pool for use in the virtual environment.

If any initialization is required before the object is pinned to object pool, it should be done in the initialize method, which takes a mutable reference to the object pool and makes it possible to do preparations e.g. creating built-in fields.

Required Methods

Provided Methods

Implementations on Foreign Types

impl Object for String
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Implementors