Struct carapax::types::AnswerPreCheckoutQuery
source · pub struct AnswerPreCheckoutQuery { /* private fields */ }
Expand description
Responds to a pre-checkout query.
Once the user has confirmed their payment and shipping details,
the Bot API sends the final confirmation in the form of an
crate::types::UpdateType::PreCheckoutQuery
.
§Notes
The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent.
Implementations§
source§impl AnswerPreCheckoutQuery
impl AnswerPreCheckoutQuery
sourcepub fn ok<T>(id: T) -> AnswerPreCheckoutQuery
pub fn ok<T>(id: T) -> AnswerPreCheckoutQuery
Creates a new AnswerPreCheckoutQuery
with a success answer.
§Arguments
id
- Unique identifier of the query to be answered.
sourcepub fn error<A, B>(id: A, message: B) -> AnswerPreCheckoutQuery
pub fn error<A, B>(id: A, message: B) -> AnswerPreCheckoutQuery
Creates a new AnswerPreCheckoutQuery
with an error answer.
§Arguments
id
- Unique identifier of the query to be answered.message
- Error message in human readable form that explains the reason for failure to proceed with the checkout.
Trait Implementations§
source§impl Clone for AnswerPreCheckoutQuery
impl Clone for AnswerPreCheckoutQuery
source§fn clone(&self) -> AnswerPreCheckoutQuery
fn clone(&self) -> AnswerPreCheckoutQuery
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AnswerPreCheckoutQuery
impl Debug for AnswerPreCheckoutQuery
source§impl Method for AnswerPreCheckoutQuery
impl Method for AnswerPreCheckoutQuery
source§impl Serialize for AnswerPreCheckoutQuery
impl Serialize for AnswerPreCheckoutQuery
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,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AnswerPreCheckoutQuery
impl RefUnwindSafe for AnswerPreCheckoutQuery
impl Send for AnswerPreCheckoutQuery
impl Sync for AnswerPreCheckoutQuery
impl Unpin for AnswerPreCheckoutQuery
impl UnwindSafe for AnswerPreCheckoutQuery
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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