Trait stepper_lib::comp::tool::Tool
source · pub trait Tool: Debug {
Show 13 methods
// Required methods
fn mount(&mut self);
fn dismount(&mut self);
fn get_json(&self) -> Value;
fn vec(&self) -> Vec3;
fn inertia(&self) -> Inertia;
fn mass(&self) -> f32;
// Provided methods
fn simple_tool(&self) -> Option<&dyn SimpleTool> { ... }
fn simple_tool_mut(&mut self) -> Option<&mut dyn SimpleTool> { ... }
fn axis_tool(&self) -> Option<&dyn AxisTool> { ... }
fn axis_tool_mut(&mut self) -> Option<&mut dyn AxisTool> { ... }
fn spindle_tool(&self) -> Option<&dyn SpindleTool> { ... }
fn spindle_tool_mut(&mut self) -> Option<&mut dyn SpindleTool> { ... }
fn get_type_name(&self) -> &str { ... }
}
Expand description
General tool trait
Required Methods§
Provided Methods§
sourcefn simple_tool(&self) -> Option<&dyn SimpleTool>
fn simple_tool(&self) -> Option<&dyn SimpleTool>
Upgrade the tool to a SimpleTool if possible, returns None
otherwise
sourcefn simple_tool_mut(&mut self) -> Option<&mut dyn SimpleTool>
fn simple_tool_mut(&mut self) -> Option<&mut dyn SimpleTool>
Upgrade the tool to a SimpleTool if possible, returns None
otherwise
sourcefn axis_tool(&self) -> Option<&dyn AxisTool>
fn axis_tool(&self) -> Option<&dyn AxisTool>
Upgrade the tool to an AxisTool if possible, returns None
otherwise
sourcefn axis_tool_mut(&mut self) -> Option<&mut dyn AxisTool>
fn axis_tool_mut(&mut self) -> Option<&mut dyn AxisTool>
Upgrade the tool to an AxisTool if possible, returns None
otherwise
sourcefn spindle_tool(&self) -> Option<&dyn SpindleTool>
fn spindle_tool(&self) -> Option<&dyn SpindleTool>
Upgrade the tool to an SpindleTool if possible, returns None
otherwise
sourcefn spindle_tool_mut(&mut self) -> Option<&mut dyn SpindleTool>
fn spindle_tool_mut(&mut self) -> Option<&mut dyn SpindleTool>
Upgrade the tool to an SpindleTool if possible, returns None
otherwise
sourcefn get_type_name(&self) -> &str
fn get_type_name(&self) -> &str
Returns the type name of the tool