pub struct Answer { /* private fields */ }
Expand description
An inline query answer builder.
Implementations§
Source§impl Answer
impl Answer
Sourcepub fn private(self) -> Self
pub fn private(self) -> Self
If set, the results will be cached by the user’s client (private) rather than by Telgram (not private).
Sourcepub fn cache_time(self, cache_time: i32) -> Self
pub fn cache_time(self, cache_time: i32) -> Self
For how long this result should be cached on the user’s client. Defaults to 0 for no cache.
Sourcepub fn next_offset(self, next_offset: impl Into<String>) -> Self
pub fn next_offset(self, next_offset: impl Into<String>) -> Self
The offset the client will send when the user scrolls the results and it repeats the request.
Sourcepub fn switch_pm(
self,
text: impl Into<String>,
start_param: impl Into<String>,
) -> Self
pub fn switch_pm( self, text: impl Into<String>, start_param: impl Into<String>, ) -> Self
If set, this text will be shown in the results to allow the user to switch to private messages.
Sourcepub async fn send(self) -> Result<(), InvocationError>
pub async fn send(self) -> Result<(), InvocationError>
Answers the inline query with the given results.
Auto Trait Implementations§
impl Freeze for Answer
impl !RefUnwindSafe for Answer
impl Send for Answer
impl Sync for Answer
impl Unpin for Answer
impl !UnwindSafe for Answer
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