pub struct SetWebhook {
pub url: String,
pub certificate: Option<InputFile>,
pub ip_address: Option<String>,
pub max_connections: Option<u32>,
pub allowed_updates: Option<Vec<String>>,
pub drop_pending_updates: Option<bool>,
pub secret_token: Option<String>,
}
Expand description
https://core.telegram.org/bots/api#setwebhook Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success. If you’d like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content.
Fields§
§url: String
§certificate: Option<InputFile>
§ip_address: Option<String>
§max_connections: Option<u32>
§allowed_updates: Option<Vec<String>>
§drop_pending_updates: Option<bool>
§secret_token: Option<String>
Trait Implementations§
Source§impl Debug for SetWebhook
impl Debug for SetWebhook
Source§impl Default for SetWebhook
impl Default for SetWebhook
Source§fn default() -> SetWebhook
fn default() -> SetWebhook
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SetWebhook
impl RefUnwindSafe for SetWebhook
impl Send for SetWebhook
impl Sync for SetWebhook
impl Unpin for SetWebhook
impl UnwindSafe 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