[][src]Struct teloxide::types::WebhookInfo

#[non_exhaustive]pub struct WebhookInfo {
    pub url: String,
    pub has_custom_certificate: bool,
    pub pending_update_count: u32,
    pub last_error_date: Option<u64>,
    pub last_error_message: Option<String>,
    pub max_connections: Option<u32>,
    pub allowed_updates: Option<Vec<String>>,
}

Contains information about the current status of a webhook.

The official docs.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
url: String

Webhook URL, may be empty if webhook is not set up.

has_custom_certificate: bool

true, if a custom certificate was provided for webhook certificate checks.

pending_update_count: u32

Number of updates awaiting delivery.

last_error_date: Option<u64>

Unix time for the most recent error that happened when trying to deliver an update via webhook.

last_error_message: Option<String>

Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook.

max_connections: Option<u32>

Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery.

allowed_updates: Option<Vec<String>>

A list of update types the bot is subscribed to. Defaults to all update types.

Implementations

impl WebhookInfo[src]

pub fn new<S>(
    url: S,
    has_custom_certificate: bool,
    pending_update_count: u32
) -> Self where
    S: Into<String>, 
[src]

pub fn url<S>(self, val: S) -> Self where
    S: Into<String>, 
[src]

pub fn has_custom_certificate(self, val: bool) -> Self[src]

pub fn pending_update_count(self, val: u32) -> Self[src]

pub fn last_error_date(self, val: u64) -> Self[src]

pub fn last_error_message<S>(self, val: S) -> Self where
    S: Into<String>, 
[src]

pub fn max_connections(self, val: u32) -> Self[src]

pub fn allowed_updates<A, S>(self, val: A) -> Self where
    A: Into<Vec<S>>,
    S: Into<String>, 
[src]

Trait Implementations

impl Clone for WebhookInfo[src]

impl Debug for WebhookInfo[src]

impl<'de> Deserialize<'de> for WebhookInfo[src]

impl Eq for WebhookInfo[src]

impl Hash for WebhookInfo[src]

impl PartialEq<WebhookInfo> for WebhookInfo[src]

impl Serialize for WebhookInfo[src]

impl StructuralEq for WebhookInfo[src]

impl StructuralPartialEq for WebhookInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.