pub struct RadiantToolManager<M> {
pub tools: BTreeMap<ToolId, Box<dyn RadiantTool<M>>>,
pub active_tool_id: ToolId,
}
Fields§
§tools: BTreeMap<ToolId, Box<dyn RadiantTool<M>>>
§active_tool_id: ToolId
Implementations§
Source§impl<M> RadiantToolManager<M>
impl<M> RadiantToolManager<M>
pub fn new<T: RadiantTool<M> + 'static>(id: ToolId, tool: Box<T>) -> Self
pub fn register_tool<T: RadiantTool<M> + 'static>( &mut self, tool_id: ToolId, tool: Box<T>, )
pub fn active_tool(&mut self) -> &mut dyn RadiantTool<M>
pub fn activate_tool(&mut self, id: u32)
Auto Trait Implementations§
impl<M> Freeze for RadiantToolManager<M>
impl<M> !RefUnwindSafe for RadiantToolManager<M>
impl<M> Send for RadiantToolManager<M>
impl<M> Sync for RadiantToolManager<M>
impl<M> Unpin for RadiantToolManager<M>
impl<M> !UnwindSafe for RadiantToolManager<M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more