pub struct PreCheckoutQueryHandler { /* private fields */ }Expand description
Handler for Update.pre_checkout_query.
Without a pattern, any pre-checkout query matches. With a pattern, only
queries whose invoice_payload matches the regex are accepted.
Implementations§
Trait Implementations§
Source§impl Handler for PreCheckoutQueryHandler
impl Handler for PreCheckoutQueryHandler
Source§fn check_update(&self, update: &Update) -> Option<MatchResult>
fn check_update(&self, update: &Update) -> Option<MatchResult>
Determine whether this handler is interested in
update. Read moreSource§fn handle_update(
&self,
update: Arc<Update>,
match_result: MatchResult,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send>>
fn handle_update( &self, update: Arc<Update>, match_result: MatchResult, ) -> Pin<Box<dyn Future<Output = HandlerResult> + Send>>
Process the update. Called only when
check_update
returned Some.Source§fn block(&self) -> bool
fn block(&self) -> bool
Whether the application should block on this handler’s future before
dispatching to the next handler group.
Source§fn collect_additional_context(
&self,
_context: &mut CallbackContext,
_match_result: &MatchResult,
)
fn collect_additional_context( &self, _context: &mut CallbackContext, _match_result: &MatchResult, )
Populate additional context fields (e.g.
context.args, context.matches)
from the match result before the handler callback is invoked. Read moreSource§fn handle_update_with_context(
&self,
update: Arc<Update>,
match_result: MatchResult,
_context: CallbackContext,
) -> Pin<Box<dyn Future<Output = HandlerResult> + Send>>
fn handle_update_with_context( &self, update: Arc<Update>, match_result: MatchResult, _context: CallbackContext, ) -> Pin<Box<dyn Future<Output = HandlerResult> + Send>>
Process the update with an Application-provided
CallbackContext. Read moreAuto Trait Implementations§
impl Freeze for PreCheckoutQueryHandler
impl !RefUnwindSafe for PreCheckoutQueryHandler
impl Send for PreCheckoutQueryHandler
impl Sync for PreCheckoutQueryHandler
impl Unpin for PreCheckoutQueryHandler
impl UnsafeUnpin for PreCheckoutQueryHandler
impl !UnwindSafe for PreCheckoutQueryHandler
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