Struct tgbot::types::InlineQueryResultDocument
source · pub struct InlineQueryResultDocument { /* private fields */ }
Expand description
Represents a link to a file.
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.
Currently, only .PDF and .ZIP files can be sent using this method.
Implementations§
source§impl InlineQueryResultDocument
impl InlineQueryResultDocument
sourcepub fn new<A, B, C, D>(document_url: A, id: B, mime_type: C, title: D) -> Self
pub fn new<A, B, C, D>(document_url: A, id: B, mime_type: C, title: D) -> Self
Creates a new InlineQueryResultDocument
.
§Arguments
document_url
- A valid URL for the file.id
- Unique identifier of the result; 1-64 bytes.mime_type
- MIME type of the content of the file, either “application/pdf” or “application/zip”.title
- Title of the result.
sourcepub fn with_description<T>(self, value: T) -> Self
pub fn with_description<T>(self, value: T) -> Self
sourcepub fn with_input_message_content<T>(self, value: T) -> Selfwhere
T: Into<InputMessageContent>,
pub fn with_input_message_content<T>(self, value: 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>,
sourcepub fn with_thumbnail_height(self, value: Integer) -> Self
pub fn with_thumbnail_height(self, value: Integer) -> Self
sourcepub fn with_thumbnail_width(self, value: Integer) -> Self
pub fn with_thumbnail_width(self, value: Integer) -> Self
sourcepub fn with_thumbnail_url<T>(self, value: T) -> Self
pub fn with_thumbnail_url<T>(self, value: T) -> Self
Trait Implementations§
source§impl Clone for InlineQueryResultDocument
impl Clone for InlineQueryResultDocument
source§fn clone(&self) -> InlineQueryResultDocument
fn clone(&self) -> InlineQueryResultDocument
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 InlineQueryResultDocument
impl Debug for InlineQueryResultDocument
source§impl<'de> Deserialize<'de> for InlineQueryResultDocument
impl<'de> Deserialize<'de> for InlineQueryResultDocument
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<InlineQueryResultDocument> for InlineQueryResult
impl From<InlineQueryResultDocument> for InlineQueryResult
source§fn from(original: InlineQueryResultDocument) -> InlineQueryResult
fn from(original: InlineQueryResultDocument) -> InlineQueryResult
Converts to this type from the input type.
source§impl PartialEq for InlineQueryResultDocument
impl PartialEq for InlineQueryResultDocument
source§fn eq(&self, other: &InlineQueryResultDocument) -> bool
fn eq(&self, other: &InlineQueryResultDocument) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InlineQueryResultDocument
Auto Trait Implementations§
impl Freeze for InlineQueryResultDocument
impl RefUnwindSafe for InlineQueryResultDocument
impl Send for InlineQueryResultDocument
impl Sync for InlineQueryResultDocument
impl Unpin for InlineQueryResultDocument
impl UnwindSafe for InlineQueryResultDocument
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