pub struct Builder { /* private fields */ }Expand description
Build a mwbot::Bot instance programmatically
Implementations§
Source§impl Builder
impl Builder
pub fn set_botpassword(self, username: String, password: String) -> Self
pub fn set_oauth2_token(self, username: String, token: String) -> Self
pub fn set_maxlag(self, maxlag: u32) -> Self
pub fn set_retry_limit(self, retry_limit: u32) -> Self
Sourcepub fn set_user_agent(self, user_agent: String) -> Self
pub fn set_user_agent(self, user_agent: String) -> Self
This adds the provided string to the User-agent, it does not override the default generated one.
pub fn set_mark_as_bot(self, mark_as_bot: bool) -> Self
pub fn set_save_delay(self, save_delay: u64) -> Self
pub fn set_respect_nobots(self, respect_nobots: bool) -> Self
pub async fn build(self) -> Result<Bot, ConfigError>
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
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