#[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: BotA bot for calling API without information inference.
id: IdThe ID of the query.
from: UserThe user who sent the query.
invoice_payload: StringThe invoice payload sent previously by the bot.
shipping_address: AddressThe 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.