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) -> AnswerShippingQuery ⓘ
Trait Implementations§
Source§impl Clone for AnswerShippingQuery
impl Clone for AnswerShippingQuery
Source§fn clone(&self) -> AnswerShippingQuery ⓘ
fn clone(&self) -> AnswerShippingQuery ⓘ
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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
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 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) -> Self
fn shipping_options<T>(self, value: T) -> Self
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 as HasPayload>::Payload
fn payload_mut(&mut self) -> &mut <P as HasPayload>::Payload
Source§fn payload_ref(&self) -> &<P as HasPayload>::Payload
fn payload_ref(&self) -> &<P as HasPayload>::Payload
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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