Struct telegram_types::bot::methods::SetWebhook [−][src]
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.
Fields
url: Cow<'a, str>
HTTPS url to send updates to. Use an empty string to remove webhook integration
ip_address: Option<IpAddr>
The fixed IP address which will be used to send webhook requests instead of the IP address resolved through DNS
max_connections: Option<i32>
Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery, 1-100. Defaults to 40. Use lower values to limit the load on your bot’s server, and higher values to increase your bot’s throughput.
allowed_updates: Option<Cow<'a, [UpdateTypes]>>
drop_pending_updates: Option<bool>
Pass True to drop all pending updates.
Implementations
impl<'a> SetWebhook<'a>
[src]
pub fn new<T: Into<Cow<'a, str>>>(url: T) -> SetWebhook<'a>
[src]
pub fn max_connections(self, x: i32) -> SetWebhook<'a>
[src]
Trait Implementations
impl<'a> Clone for SetWebhook<'a>
[src]
fn clone(&self) -> SetWebhook<'a>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for SetWebhook<'a>
[src]
impl<'de, 'a> Deserialize<'de> for SetWebhook<'a>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'a> Eq for SetWebhook<'a>
[src]
impl Method for SetWebhook<'_>
[src]
impl<'a> PartialEq<SetWebhook<'a>> for SetWebhook<'a>
[src]
fn eq(&self, other: &SetWebhook<'a>) -> bool
[src]
fn ne(&self, other: &SetWebhook<'a>) -> bool
[src]
impl<'a> Serialize for SetWebhook<'a>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'a> StructuralEq for SetWebhook<'a>
[src]
impl<'a> StructuralPartialEq for SetWebhook<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for SetWebhook<'a>
impl<'a> Send for SetWebhook<'a>
impl<'a> Sync for SetWebhook<'a>
impl<'a> Unpin for SetWebhook<'a>
impl<'a> UnwindSafe for SetWebhook<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,