Struct tgbot::types::InlineQueryResultCachedDocument
source · pub struct InlineQueryResultCachedDocument { /* private fields */ }
Expand description
Represents a link to a file stored on the Telegram servers.
By default, this file will be sent by the user with an optional caption. Alternatively, you can use Self::with_input_message_content to send a message with the specified content instead of the file.
Implementations§
source§impl InlineQueryResultCachedDocument
impl InlineQueryResultCachedDocument
sourcepub fn new<A, B, C>(document_file_id: A, id: B, title: C) -> Self
pub fn new<A, B, C>(document_file_id: A, id: B, title: C) -> Self
Creates a new InlineQueryResultCachedDocument
.
§Arguments
document_file_id
- A valid file identifier of the file.id
- Unique identifier of the result; 1-64 bytes.title
- Title of the result.
sourcepub fn with_description<T>(self, description: T) -> Self
pub fn with_description<T>(self, description: T) -> Self
sourcepub fn with_input_message_content<T>(self, input_message_content: T) -> Selfwhere
T: Into<InputMessageContent>,
pub fn with_input_message_content<T>(self, input_message_content: T) -> Selfwhere
T: Into<InputMessageContent>,
Sets a new input message content.
§Arguments
value
- Content of the message to be sent instead of the file.
sourcepub fn with_reply_markup<T>(self, value: T) -> Selfwhere
T: Into<InlineKeyboardMarkup>,
pub fn with_reply_markup<T>(self, value: T) -> Selfwhere
T: Into<InlineKeyboardMarkup>,
Trait Implementations§
source§impl Clone for InlineQueryResultCachedDocument
impl Clone for InlineQueryResultCachedDocument
source§fn clone(&self) -> InlineQueryResultCachedDocument
fn clone(&self) -> InlineQueryResultCachedDocument
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<'de> Deserialize<'de> for InlineQueryResultCachedDocument
impl<'de> Deserialize<'de> for InlineQueryResultCachedDocument
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<InlineQueryResultCachedDocument> for InlineQueryResult
impl From<InlineQueryResultCachedDocument> for InlineQueryResult
source§fn from(original: InlineQueryResultCachedDocument) -> InlineQueryResult
fn from(original: InlineQueryResultCachedDocument) -> InlineQueryResult
Converts to this type from the input type.
source§impl PartialEq for InlineQueryResultCachedDocument
impl PartialEq for InlineQueryResultCachedDocument
source§fn eq(&self, other: &InlineQueryResultCachedDocument) -> bool
fn eq(&self, other: &InlineQueryResultCachedDocument) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InlineQueryResultCachedDocument
Auto Trait Implementations§
impl Freeze for InlineQueryResultCachedDocument
impl RefUnwindSafe for InlineQueryResultCachedDocument
impl Send for InlineQueryResultCachedDocument
impl Sync for InlineQueryResultCachedDocument
impl Unpin for InlineQueryResultCachedDocument
impl UnwindSafe for InlineQueryResultCachedDocument
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