#[non_exhaustive]pub struct Shipping {
pub bot: Bot,
pub id: Id,
pub from: User,
pub invoice_payload: String,
pub shipping_address: Address,
}
Expand description
The context for shipping
handlers.
Fields (Non-exhaustive)§
This struct is marked as 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.bot: Bot
A bot for calling API without information inference.
id: Id
The ID of the query.
from: User
The user who sent the query.
invoice_payload: String
The invoice payload sent previously by the bot.
shipping_address: Address
The shipping address specified by the user.
Implementations§
source§impl Shipping
impl Shipping
sourcepub fn answer(
&self,
result: Result<impl Into<Vec<Option>>, impl Into<String>>
) -> AnswerShippingQuery<'_>
pub fn answer(
&self,
result: Result<impl Into<Vec<Option>>, impl Into<String>>
) -> AnswerShippingQuery<'_>
sourcepub fn ok(&self, options: impl Into<Vec<Option>>) -> AnswerShippingQuery<'_>
pub fn ok(&self, options: impl Into<Vec<Option>>) -> AnswerShippingQuery<'_>
Reports that shipping is possible and shows possible shipping options.
sourcepub fn err(&self, err: impl Into<String>) -> AnswerShippingQuery<'_>
pub fn err(&self, err: impl Into<String>) -> AnswerShippingQuery<'_>
Reports that shipping is impossible and shows the error message.