pub struct RadiantToolManager<M> {
pub tools: BTreeMap<u32, Box<dyn RadiantTool<M>>>,
pub active_tool_id: u32,
}Fields§
§tools: BTreeMap<u32, Box<dyn RadiantTool<M>>>§active_tool_id: u32Implementations§
Source§impl<M> RadiantToolManager<M>
impl<M> RadiantToolManager<M>
pub fn new<T>(id: u32, tool: Box<T>) -> RadiantToolManager<M>where
T: RadiantTool<M> + 'static,
pub fn register_tool<T>(&mut self, tool_id: u32, tool: Box<T>)where
T: RadiantTool<M> + 'static,
pub fn active_tool(&mut self) -> &mut dyn RadiantTool<M>
pub fn activate_tool(&mut self, id: u32)
Auto Trait Implementations§
impl<M> !RefUnwindSafe for RadiantToolManager<M>
impl<M> !UnwindSafe for RadiantToolManager<M>
impl<M> Freeze for RadiantToolManager<M>
impl<M> Send for RadiantToolManager<M>
impl<M> Sync for RadiantToolManager<M>
impl<M> Unpin for RadiantToolManager<M>
impl<M> UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more