pub struct InputTextMessageContentBuilder {
pub message_text: String,
pub parse_mode: Option<String>,
pub entities: Option<Vec<MessageEntity>>,
pub link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>,
}Expand description
Represents the content of a text message to be sent as the result of an inline query.
Fields§
§message_text: StringText of the message to be sent, 1-4096 characters
parse_mode: Option<String>Optional. Mode for parsing entities in the message text. See formatting options for more details.
entities: Option<Vec<MessageEntity>>Optional. List of special entities that appear in message text, which can be specified instead of parse_mode
link_preview_options: Option<BoxWrapper<Unbox<LinkPreviewOptions>>>Optional. Link preview generation options for the message
Implementations§
Source§impl InputTextMessageContentBuilder
impl InputTextMessageContentBuilder
pub fn new(message_text: String) -> Self
Sourcepub fn set_message_text(self, message_text: String) -> Self
pub fn set_message_text(self, message_text: String) -> Self
Text of the message to be sent, 1-4096 characters
Sourcepub fn set_parse_mode(self, parse_mode: String) -> Self
pub fn set_parse_mode(self, parse_mode: String) -> Self
Optional. Mode for parsing entities in the message text. See formatting options for more details.
Sourcepub fn set_entities(self, entities: Vec<MessageEntity>) -> Self
pub fn set_entities(self, entities: Vec<MessageEntity>) -> Self
Optional. List of special entities that appear in message text, which can be specified instead of parse_mode
Sourcepub fn set_link_preview_options(
self,
link_preview_options: LinkPreviewOptions,
) -> Self
pub fn set_link_preview_options( self, link_preview_options: LinkPreviewOptions, ) -> Self
Optional. Link preview generation options for the message
pub fn build(self) -> InputTextMessageContent
Trait Implementations§
Source§impl Clone for InputTextMessageContentBuilder
impl Clone for InputTextMessageContentBuilder
Source§fn clone(&self) -> InputTextMessageContentBuilder
fn clone(&self) -> InputTextMessageContentBuilder
Returns a duplicate 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 Default for InputTextMessageContentBuilder
impl Default for InputTextMessageContentBuilder
Source§fn default() -> InputTextMessageContentBuilder
fn default() -> InputTextMessageContentBuilder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InputTextMessageContentBuilder
impl<'de> Deserialize<'de> for InputTextMessageContentBuilder
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 Ord for InputTextMessageContentBuilder
impl Ord for InputTextMessageContentBuilder
Source§fn cmp(&self, other: &InputTextMessageContentBuilder) -> Ordering
fn cmp(&self, other: &InputTextMessageContentBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for InputTextMessageContentBuilder
impl PartialEq for InputTextMessageContentBuilder
Source§fn eq(&self, other: &InputTextMessageContentBuilder) -> bool
fn eq(&self, other: &InputTextMessageContentBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for InputTextMessageContentBuilder
impl PartialOrd for InputTextMessageContentBuilder
impl Eq for InputTextMessageContentBuilder
impl StructuralPartialEq for InputTextMessageContentBuilder
Auto Trait Implementations§
impl Freeze for InputTextMessageContentBuilder
impl RefUnwindSafe for InputTextMessageContentBuilder
impl Send for InputTextMessageContentBuilder
impl Sync for InputTextMessageContentBuilder
impl Unpin for InputTextMessageContentBuilder
impl UnsafeUnpin for InputTextMessageContentBuilder
impl UnwindSafe for InputTextMessageContentBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.