pub struct AnswerShippingQuery {
pub shipping_query_id: ShippingQueryId,
pub ok: bool,
pub shipping_options: Option<Vec<ShippingOption>>,
pub error_message: Option<String>,
}Expand description
If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned.
Fields§
§shipping_query_id: ShippingQueryIdUnique identifier for the query to be answered
ok: boolSpecify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
shipping_options: Option<Vec<ShippingOption>>Required if ok is True. A JSON-serialized array of available shipping options.
error_message: Option<String>Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. ‘Sorry, delivery to your desired address is unavailable’). Telegram will display this message to the user.
Implementations§
Source§impl AnswerShippingQuery
impl AnswerShippingQuery
pub fn new(shipping_query_id: ShippingQueryId, ok: bool) -> Self
Trait Implementations§
Source§impl Clone for AnswerShippingQuery
impl Clone for AnswerShippingQuery
Source§impl Debug for AnswerShippingQuery
impl Debug for AnswerShippingQuery
impl Eq for AnswerShippingQuery
Source§impl Hash for AnswerShippingQuery
impl Hash for AnswerShippingQuery
Source§impl PartialEq for AnswerShippingQuery
impl PartialEq for AnswerShippingQuery
Source§impl Payload for AnswerShippingQuery
impl Payload for AnswerShippingQuery
Source§const NAME: &'static str = "AnswerShippingQuery"
const NAME: &'static str = "AnswerShippingQuery"
EditMessageTextInline).Source§const TELEGRAM_METHOD: &'static str = Self::NAME
const TELEGRAM_METHOD: &'static str = Self::NAME
EditMessageText). Defaults to the payload name.Source§fn timeout_hint(&self) -> Option<Duration>
fn timeout_hint(&self) -> Option<Duration>
GetUpdates with
big timeout), the minimum timeout that should be used.Source§impl Serialize for AnswerShippingQuery
impl Serialize for AnswerShippingQuery
impl StructuralPartialEq for AnswerShippingQuery
Auto Trait Implementations§
impl Forget for AnswerShippingQuery
impl Freeze for AnswerShippingQuery
impl Move for AnswerShippingQuery
impl RefUnwindSafe for AnswerShippingQuery
impl Send for AnswerShippingQuerywhere
RawVecInner: Send,
impl Sync for AnswerShippingQuerywhere
RawVecInner: Sync,
impl Unpin for AnswerShippingQuery
impl UnsafeUnpin for AnswerShippingQuerywhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ShippingOption>: UnsafeUnpin,
impl UnwindSafe for AnswerShippingQuerywhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<P> AnswerShippingQuerySetters for Pwhere
P: HasPayload<Payload = AnswerShippingQuery>,
impl<P> AnswerShippingQuerySetters for Pwhere
P: HasPayload<Payload = AnswerShippingQuery>,
Source§fn shipping_query_id(self, value: ShippingQueryId) -> Self
fn shipping_query_id(self, value: ShippingQueryId) -> Self
shipping_query_id field.Source§fn shipping_options<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = ShippingOption>,
fn shipping_options<T>(self, value: T) -> Selfwhere
T: IntoIterator<Item = ShippingOption>,
shipping_options field.Source§fn error_message<T>(self, value: T) -> Self
fn error_message<T>(self, value: T) -> Self
error_message field.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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<P> HasPayload for Pwhere
P: Payload,
impl<P> HasPayload for Pwhere
P: Payload,
Source§fn payload_mut(&mut self) -> &mut P
fn payload_mut(&mut self) -> &mut P
Source§fn payload_ref(&self) -> &P
fn payload_ref(&self) -> &P
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