pub struct ExtBotBuilder { /* private fields */ }Expand description
Implementations§
Source§impl ExtBotBuilder
impl ExtBotBuilder
Sourcepub fn new(token: impl Into<String>, request: Arc<dyn BaseRequest>) -> Self
pub fn new(token: impl Into<String>, request: Arc<dyn BaseRequest>) -> Self
Creates a new builder with the required token and HTTP request backend.
Sourcepub fn base_url(self, url: impl Into<String>) -> Self
pub fn base_url(self, url: impl Into<String>) -> Self
Sets a custom base URL (e.g. for a local Bot API server).
Sourcepub fn base_file_url(self, url: impl Into<String>) -> Self
pub fn base_file_url(self, url: impl Into<String>) -> Self
Sets a custom base file URL.
Sourcepub fn arbitrary_callback_data(self, maxsize: usize) -> Self
pub fn arbitrary_callback_data(self, maxsize: usize) -> Self
Enables arbitrary callback data with the given cache size.
Pass 0 to use the default maxsize of 1024.
Sourcepub fn rate_limiter(self, _rl: ()) -> Self
pub fn rate_limiter(self, _rl: ()) -> Self
Sets the rate-limiter placeholder (feature disabled).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExtBotBuilder
impl !RefUnwindSafe for ExtBotBuilder
impl Send for ExtBotBuilder
impl Sync for ExtBotBuilder
impl Unpin for ExtBotBuilder
impl UnsafeUnpin for ExtBotBuilder
impl !UnwindSafe for ExtBotBuilder
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