pub trait ScriptBackend {
Show 20 methods
// Required methods
fn load(&mut self, path: &str, class: &str) -> Result<()>;
fn call_ready(&mut self) -> Result<()>;
fn call_process(&mut self, delta: f64) -> Result<()>;
fn reload(&mut self) -> Result<()>;
// Provided methods
fn call_physics_process(&mut self, _delta: f64) -> Result<()> { ... }
fn position(&self) -> Option<(f64, f64)> { ... }
fn set_position(&mut self, _x: f64, _y: f64) { ... }
fn velocity(&self) -> Option<(f64, f64)> { ... }
fn set_velocity(&mut self, _vx: f64, _vy: f64) { ... }
fn set_on_floor(&mut self, _on_floor: bool) { ... }
fn set_on_wall(&mut self, _on_wall: bool) { ... }
fn set_on_ceiling(&mut self, _on_ceiling: bool) { ... }
fn text(&self) -> Option<String> { ... }
fn set_text(&mut self, _text: &str) { ... }
fn size(&self) -> Option<(f64, f64)> { ... }
fn set_size(&mut self, _w: f64, _h: f64) { ... }
fn wait_time(&self) -> Option<f64> { ... }
fn set_wait_time(&mut self, _wait: f64) { ... }
fn last_error(&self) -> Option<String> { ... }
fn last_script_error(&self) -> Option<ScriptError> { ... }
}Required Methods§
fn load(&mut self, path: &str, class: &str) -> Result<()>
fn call_ready(&mut self) -> Result<()>
fn call_process(&mut self, delta: f64) -> Result<()>
fn reload(&mut self) -> Result<()>
Provided Methods§
fn call_physics_process(&mut self, _delta: f64) -> Result<()>
fn position(&self) -> Option<(f64, f64)>
fn set_position(&mut self, _x: f64, _y: f64)
fn velocity(&self) -> Option<(f64, f64)>
fn set_velocity(&mut self, _vx: f64, _vy: f64)
fn set_on_floor(&mut self, _on_floor: bool)
fn set_on_wall(&mut self, _on_wall: bool)
fn set_on_ceiling(&mut self, _on_ceiling: bool)
fn text(&self) -> Option<String>
fn set_text(&mut self, _text: &str)
fn size(&self) -> Option<(f64, f64)>
fn set_size(&mut self, _w: f64, _h: f64)
fn wait_time(&self) -> Option<f64>
fn set_wait_time(&mut self, _wait: f64)
fn last_error(&self) -> Option<String>
fn last_script_error(&self) -> Option<ScriptError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".