pub struct Registry<T: Clone + Send + Sync> {
pub tasks: HashMap<String, TaskHandler<T>>,
/* private fields */
}Fields§
§tasks: HashMap<String, TaskHandler<T>>Implementations§
Source§impl<T: Clone + Send + Sync> Registry<T>
impl<T: Clone + Send + Sync> Registry<T>
pub fn new() -> Self
pub fn register(&mut self, module: Module<T>)
pub fn global_commands(&self) -> Vec<Command>
pub fn module_commands(&self, module: &str) -> Option<Vec<Command>>
pub fn find_command(&self, name: &str) -> Option<&CommandHandler<T>>
pub fn guild_module_names(&self) -> Vec<String>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Registry<T>
impl<T> RefUnwindSafe for Registry<T>
impl<T> Send for Registry<T>
impl<T> Sync for Registry<T>
impl<T> Unpin for Registry<T>
impl<T> UnwindSafe for Registry<T>
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