pub struct FrameworkBuilder<U, E> { /* private fields */ }Expand description
A builder to configure a framework.
If one of the following required values is missing, the builder will panic on start:
Implementations§
Source§impl<U, E> FrameworkBuilder<U, E>
impl<U, E> FrameworkBuilder<U, E>
Sourcepub fn setup<F>(self, setup: F) -> Self
pub fn setup<F>(self, setup: F) -> Self
Sets the setup callback which also returns the user data struct.
Sourcepub fn options(self, options: FrameworkOptions<U, E>) -> Self
pub fn options(self, options: FrameworkOptions<U, E>) -> Self
Configure framework options
Sourcepub fn initialize_owners(self, initialize_owners: bool) -> Self
pub fn initialize_owners(self, initialize_owners: bool) -> Self
Whether to add this bot application’s owner and team members to
crate::FrameworkOptions::owners automatically
true by default
Trait Implementations§
Auto Trait Implementations§
impl<U, E> Freeze for FrameworkBuilder<U, E>
impl<U, E> !RefUnwindSafe for FrameworkBuilder<U, E>
impl<U, E> Send for FrameworkBuilder<U, E>
impl<U, E> Sync for FrameworkBuilder<U, E>
impl<U, E> Unpin for FrameworkBuilder<U, E>
impl<U, E> UnsafeUnpin for FrameworkBuilder<U, E>
impl<U, E> !UnwindSafe for FrameworkBuilder<U, E>
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