Struct telegram_types::bot::methods::SetWebhook
source · pub struct SetWebhook<'a> {
pub url: Cow<'a, str>,
pub max_connections: Option<i32>,
pub allowed_updates: Option<Cow<'a, [UpdateTypes]>>,
}
Expand description
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>
max_connections: Option<i32>
allowed_updates: Option<Cow<'a, [UpdateTypes]>>
Implementations
sourceimpl<'a> SetWebhook<'a>
impl<'a> SetWebhook<'a>
pub fn new<T: Into<Cow<'a, str>>>(url: T) -> SetWebhook<'a>
pub fn max_connections(self, x: i32) -> SetWebhook<'a>
Trait Implementations
sourceimpl<'a> Clone for SetWebhook<'a>
impl<'a> Clone for SetWebhook<'a>
sourcefn clone(&self) -> SetWebhook<'a>
fn clone(&self) -> SetWebhook<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<'a> Debug for SetWebhook<'a>
impl<'a> Debug for SetWebhook<'a>
sourceimpl<'de, 'a> Deserialize<'de> for SetWebhook<'a>
impl<'de, 'a> Deserialize<'de> for SetWebhook<'a>
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'a> Method for SetWebhook<'a>
impl<'a> Method for SetWebhook<'a>
sourceimpl<'a> PartialEq<SetWebhook<'a>> for SetWebhook<'a>
impl<'a> PartialEq<SetWebhook<'a>> for SetWebhook<'a>
sourcefn eq(&self, other: &SetWebhook<'a>) -> bool
fn eq(&self, other: &SetWebhook<'a>) -> bool
sourceimpl<'a> Serialize for SetWebhook<'a>
impl<'a> Serialize for SetWebhook<'a>
impl<'a> Eq for SetWebhook<'a>
impl<'a> StructuralEq for SetWebhook<'a>
impl<'a> StructuralPartialEq for SetWebhook<'a>
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more