Struct carapax::types::WebhookInfo
source · pub struct WebhookInfo {
pub has_custom_certificate: bool,
pub pending_update_count: i64,
pub url: String,
pub allowed_updates: Option<Vec<AllowedUpdate>>,
pub ip_address: Option<String>,
pub last_error_date: Option<i64>,
pub last_error_message: Option<String>,
pub last_synchronization_error_date: Option<i64>,
pub max_connections: Option<i64>,
}
Expand description
Represents a current status of a webhook.
Fields§
§has_custom_certificate: bool
Indicates whether a custom certificate was provided for webhook certificate checks.
pending_update_count: i64
Number of updates awaiting delivery.
url: String
Webhook URL, may be empty if webhook is not set up.
allowed_updates: Option<Vec<AllowedUpdate>>
A list of update types the bot is subscribed to.
Defaults to all update types.
ip_address: Option<String>
Currently used webhook IP address.
last_error_date: Option<i64>
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.
last_synchronization_error_date: Option<i64>
Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters.
max_connections: Option<i64>
Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery.
Implementations§
source§impl WebhookInfo
impl WebhookInfo
sourcepub fn new<T>(
url: T,
has_custom_certificate: bool,
pending_update_count: i64
) -> WebhookInfo
pub fn new<T>( url: T, has_custom_certificate: bool, pending_update_count: i64 ) -> WebhookInfo
Creates a new WebhookInfo
.
§Arguments
url
- Webhook URL.has_custom_certificate
- Indicates whether a custom certificate was provided.pending_update_count
- Number of updates awaiting delivery.
sourcepub fn with_allowed_updates<T>(self, value: T) -> WebhookInfowhere
T: IntoIterator<Item = AllowedUpdate>,
pub fn with_allowed_updates<T>(self, value: T) -> WebhookInfowhere
T: IntoIterator<Item = AllowedUpdate>,
sourcepub fn with_ip_address<T>(self, value: T) -> WebhookInfo
pub fn with_ip_address<T>(self, value: T) -> WebhookInfo
sourcepub fn with_last_error_date(self, value: i64) -> WebhookInfo
pub fn with_last_error_date(self, value: i64) -> WebhookInfo
sourcepub fn with_last_error_message<T>(self, value: T) -> WebhookInfo
pub fn with_last_error_message<T>(self, value: T) -> WebhookInfo
sourcepub fn with_last_synchronization_error_date(self, value: i64) -> WebhookInfo
pub fn with_last_synchronization_error_date(self, value: i64) -> WebhookInfo
sourcepub fn with_max_connections(self, value: i64) -> WebhookInfo
pub fn with_max_connections(self, value: i64) -> WebhookInfo
Trait Implementations§
source§impl Clone for WebhookInfo
impl Clone for WebhookInfo
source§fn clone(&self) -> WebhookInfo
fn clone(&self) -> WebhookInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WebhookInfo
impl Debug for WebhookInfo
source§impl<'de> Deserialize<'de> for WebhookInfo
impl<'de> Deserialize<'de> for WebhookInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<WebhookInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<WebhookInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for WebhookInfo
impl PartialEq for WebhookInfo
source§fn eq(&self, other: &WebhookInfo) -> bool
fn eq(&self, other: &WebhookInfo) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for WebhookInfo
impl PartialOrd for WebhookInfo
source§fn partial_cmp(&self, other: &WebhookInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &WebhookInfo) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for WebhookInfo
impl Serialize for WebhookInfo
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for WebhookInfo
Auto Trait Implementations§
impl Freeze for WebhookInfo
impl RefUnwindSafe for WebhookInfo
impl Send for WebhookInfo
impl Sync for WebhookInfo
impl Unpin for WebhookInfo
impl UnwindSafe for WebhookInfo
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more