pub struct SetWebhook { /* private fields */ }Expand description
Builder for the setWebhook method.
Implementations§
Source§impl SetWebhook
impl SetWebhook
Sourcepub fn certificate(self, certificate: InputFile) -> Self
pub fn certificate(self, certificate: InputFile) -> Self
Uploads a public key certificate so Telegram can verify a self-signed setup.
Supplying one switches the request to multipart. Telegram requires the
certificate to be uploaded as a file, so InputFile::Url and
InputFile::FileId are not accepted here — use InputFile::Bytes.
Sourcepub fn ip_address(self, ip: impl Into<String>) -> Self
pub fn ip_address(self, ip: impl Into<String>) -> Self
Overrides the resolved IP address of the webhook server.
Sourcepub fn max_connections(self, n: u8) -> Self
pub fn max_connections(self, n: u8) -> Self
Sets the maximum number of concurrent HTTPS connections (1–100, default 40).
Sourcepub fn allowed_updates(self, types: Vec<impl Into<String>>) -> Self
pub fn allowed_updates(self, types: Vec<impl Into<String>>) -> Self
List of update types to receive. All types received if omitted.
Sourcepub fn drop_pending_updates(self, v: bool) -> Self
pub fn drop_pending_updates(self, v: bool) -> Self
If true, the webhook server will remove all pending updates.
Sourcepub fn secret_token(self, token: impl Into<String>) -> Self
pub fn secret_token(self, token: impl Into<String>) -> Self
Sets the secret token Telegram sends in X-Telegram-Bot-Api-Secret-Token
on every webhook request.
Trait Implementations§
Source§impl IntoFuture for SetWebhook
impl IntoFuture for SetWebhook
Source§type IntoFuture = Pin<Box<dyn Future<Output = <SetWebhook as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <SetWebhook as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SetWebhook
impl !UnwindSafe for SetWebhook
impl Freeze for SetWebhook
impl Send for SetWebhook
impl Sync for SetWebhook
impl Unpin for SetWebhook
impl UnsafeUnpin for SetWebhook
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