Struct frankenstein::api_params::SendMessageParams
source · [−]pub struct SendMessageParams {
pub chat_id: ChatId,
pub text: String,
pub parse_mode: Option<ParseMode>,
pub entities: Option<Vec<MessageEntity>>,
pub disable_web_page_preview: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub reply_to_message_id: Option<i32>,
pub allow_sending_without_reply: Option<bool>,
pub reply_markup: Option<ReplyMarkup>,
}
Fields
chat_id: ChatId
text: String
parse_mode: Option<ParseMode>
entities: Option<Vec<MessageEntity>>
disable_web_page_preview: Option<bool>
disable_notification: Option<bool>
protect_content: Option<bool>
reply_to_message_id: Option<i32>
allow_sending_without_reply: Option<bool>
reply_markup: Option<ReplyMarkup>
Implementations
sourceimpl SendMessageParams
impl SendMessageParams
sourcepub fn builder(
) -> SendMessageParamsBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder(
) -> SendMessageParamsBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building SendMessageParams
.
On the builder, call .chat_id(...)
, .text(...)
, .parse_mode(...)
(optional), .entities(...)
(optional), .disable_web_page_preview(...)
(optional), .disable_notification(...)
(optional), .protect_content(...)
(optional), .reply_to_message_id(...)
(optional), .allow_sending_without_reply(...)
(optional), .reply_markup(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of SendMessageParams
.
Trait Implementations
sourceimpl Clone for SendMessageParams
impl Clone for SendMessageParams
sourcefn clone(&self) -> SendMessageParams
fn clone(&self) -> SendMessageParams
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SendMessageParams
impl Debug for SendMessageParams
sourceimpl<'de> Deserialize<'de> for SendMessageParams
impl<'de> Deserialize<'de> for SendMessageParams
sourcefn 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
sourceimpl PartialEq<SendMessageParams> for SendMessageParams
impl PartialEq<SendMessageParams> for SendMessageParams
sourcefn eq(&self, other: &SendMessageParams) -> bool
fn eq(&self, other: &SendMessageParams) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SendMessageParams) -> bool
fn ne(&self, other: &SendMessageParams) -> bool
This method tests for !=
.
sourceimpl Serialize for SendMessageParams
impl Serialize for SendMessageParams
impl StructuralPartialEq for SendMessageParams
Auto Trait Implementations
impl RefUnwindSafe for SendMessageParams
impl Send for SendMessageParams
impl Sync for SendMessageParams
impl Unpin for SendMessageParams
impl UnwindSafe for SendMessageParams
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more