pub struct ModuleBuilder<T: Clone + Send + Sync> { /* private fields */ }
Implementations§
Source§impl<T: Clone + Send + Sync> ModuleBuilder<T>
impl<T: Clone + Send + Sync> ModuleBuilder<T>
pub fn new(name: &str) -> Self
pub fn build(self) -> Module<T>
pub fn guild(self) -> Self
pub fn command(self, command: CommandBuilder<T>) -> Self
pub fn component( self, custom_id: &str, func: fn(ComponentInteractionContext<T>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>, ) -> Self
pub fn event( self, event: EventType, func: fn(EventContext<T>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>, ) -> Self
pub fn task( self, name: &str, schedule: &str, func: fn(TaskContext<T>) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>, ) -> Self
Auto Trait Implementations§
impl<T> Freeze for ModuleBuilder<T>
impl<T> RefUnwindSafe for ModuleBuilder<T>
impl<T> Send for ModuleBuilder<T>
impl<T> Sync for ModuleBuilder<T>
impl<T> Unpin for ModuleBuilder<T>
impl<T> UnwindSafe for ModuleBuilder<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