pub trait Object:
Sized
+ Clone
+ Debug
+ Display
+ Add
+ Sub
+ Mul
+ Div
+ Rem
+ Ord
+ Not {
Show 40 methods
// Required methods
fn new(value_type: Type, contents: Vec<Number>) -> Self;
fn get_type(&self) -> Type;
fn get_list(&self) -> Vec<Self>;
fn get_contents(&self) -> Vec<Number>;
fn get_attributes(&self) -> Table<Self>;
fn get_foreign_function(&self) -> fn(Self) -> Self;
fn set_type(&mut self, object_type: Type);
fn set_list(&mut self, list: Vec<Self>);
fn set_contents(&mut self, contents: Vec<Number>);
fn set_attributes(&mut self, attributes: Table<Self>);
fn set_foreign_function(&mut self, function: fn(Self) -> Self);
// Provided methods
fn empty_instance() -> Self { ... }
fn from_string(string: String) -> Self { ... }
fn from_str(string: &str) -> Self { ... }
fn from_f64(decimal: f64) -> Self { ... }
fn from_number(n: Number) -> Self { ... }
fn from_instruction(instruction: Instruction) -> Self { ... }
fn from_problem(problem: Problem) -> Self { ... }
fn from_vector(vector: Vec<Self>) -> Self { ... }
fn from_nothing() -> Self { ... }
fn from_function(vector: Vec<Self>) -> Self { ... }
fn from_foreign_function(function: fn(Self) -> Self) -> Self { ... }
fn get_attr(&self, name: String) -> Self { ... }
fn as_number(&self) -> Number { ... }
fn as_usize(&self) -> usize { ... }
fn as_string(&self) -> String { ... }
fn as_list(&self) -> Vec<Self> { ... }
fn as_instruction(&self) -> Instruction { ... }
fn as_instance(&self) -> Table<Self> { ... }
fn as_foreign_function(&self) -> fn(Self) -> Self { ... }
fn set_attr(&mut self, name: String, object: Self) { ... }
fn get_attr_recursive(&mut self, names: Vec<String>) -> Self { ... }
fn set_attr_recursive(&mut self, names: Vec<String>, object: Self) -> Self { ... }
fn index(&mut self, index: Self) -> Self { ... }
fn list_push(&mut self, object: Self) { ... }
fn list_pop(&mut self) -> Self { ... }
fn call_foreign_function(&mut self, parameter: Self) -> Self { ... }
fn format(&self) -> String { ... }
fn print(&self) { ... }
fn println(&self) { ... }
}
Required Methods§
fn new(value_type: Type, contents: Vec<Number>) -> Self
fn get_type(&self) -> Type
fn get_list(&self) -> Vec<Self>
fn get_contents(&self) -> Vec<Number>
fn get_attributes(&self) -> Table<Self>
fn get_foreign_function(&self) -> fn(Self) -> Self
fn set_type(&mut self, object_type: Type)
fn set_list(&mut self, list: Vec<Self>)
fn set_contents(&mut self, contents: Vec<Number>)
fn set_attributes(&mut self, attributes: Table<Self>)
fn set_foreign_function(&mut self, function: fn(Self) -> Self)
Provided Methods§
fn empty_instance() -> Self
fn from_string(string: String) -> Self
fn from_str(string: &str) -> Self
fn from_f64(decimal: f64) -> Self
fn from_number(n: Number) -> Self
fn from_instruction(instruction: Instruction) -> Self
fn from_problem(problem: Problem) -> Self
fn from_vector(vector: Vec<Self>) -> Self
fn from_nothing() -> Self
fn from_function(vector: Vec<Self>) -> Self
fn from_foreign_function(function: fn(Self) -> Self) -> Self
fn get_attr(&self, name: String) -> Self
fn as_number(&self) -> Number
fn as_usize(&self) -> usize
fn as_string(&self) -> String
fn as_list(&self) -> Vec<Self>
fn as_instruction(&self) -> Instruction
fn as_instance(&self) -> Table<Self>
fn as_foreign_function(&self) -> fn(Self) -> Self
fn set_attr(&mut self, name: String, object: Self)
fn get_attr_recursive(&mut self, names: Vec<String>) -> Self
fn set_attr_recursive(&mut self, names: Vec<String>, object: Self) -> Self
fn index(&mut self, index: Self) -> Self
fn list_push(&mut self, object: Self)
fn list_pop(&mut self) -> Self
fn call_foreign_function(&mut self, parameter: Self) -> Self
fn format(&self) -> String
fn print(&self)
fn println(&self)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.