Struct frankenstein::api_params::SendPollParams
source · pub struct SendPollParams {Show 19 fields
pub business_connection_id: Option<String>,
pub chat_id: ChatId,
pub message_thread_id: Option<i32>,
pub question: String,
pub options: Vec<String>,
pub is_anonymous: Option<bool>,
pub type_field: Option<PollType>,
pub allows_multiple_answers: Option<bool>,
pub correct_option_id: Option<u8>,
pub explanation: Option<String>,
pub explanation_parse_mode: Option<ParseMode>,
pub explanation_entities: Option<Vec<MessageEntity>>,
pub open_period: Option<u32>,
pub close_date: Option<u64>,
pub is_closed: Option<bool>,
pub disable_notification: Option<bool>,
pub protect_content: Option<bool>,
pub reply_parameters: Option<ReplyParameters>,
pub reply_markup: Option<ReplyMarkup>,
}
Fields§
§business_connection_id: Option<String>
§chat_id: ChatId
§message_thread_id: Option<i32>
§question: String
§options: Vec<String>
§is_anonymous: Option<bool>
§type_field: Option<PollType>
§allows_multiple_answers: Option<bool>
§correct_option_id: Option<u8>
§explanation: Option<String>
§explanation_parse_mode: Option<ParseMode>
§explanation_entities: Option<Vec<MessageEntity>>
§open_period: Option<u32>
§close_date: Option<u64>
§is_closed: Option<bool>
§disable_notification: Option<bool>
§protect_content: Option<bool>
§reply_parameters: Option<ReplyParameters>
§reply_markup: Option<ReplyMarkup>
Implementations§
source§impl SendPollParams
impl SendPollParams
sourcepub fn builder(
) -> SendPollParamsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder( ) -> SendPollParamsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building SendPollParams
.
On the builder, call .business_connection_id(...)
(optional), .chat_id(...)
, .message_thread_id(...)
(optional), .question(...)
, .options(...)
, .is_anonymous(...)
(optional), .type_field(...)
(optional), .allows_multiple_answers(...)
(optional), .correct_option_id(...)
(optional), .explanation(...)
(optional), .explanation_parse_mode(...)
(optional), .explanation_entities(...)
(optional), .open_period(...)
(optional), .close_date(...)
(optional), .is_closed(...)
(optional), .disable_notification(...)
(optional), .protect_content(...)
(optional), .reply_parameters(...)
(optional), .reply_markup(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of SendPollParams
.
Trait Implementations§
source§impl Clone for SendPollParams
impl Clone for SendPollParams
source§fn clone(&self) -> SendPollParams
fn clone(&self) -> SendPollParams
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 SendPollParams
impl Debug for SendPollParams
source§impl<'de> Deserialize<'de> for SendPollParams
impl<'de> Deserialize<'de> for SendPollParams
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 PartialEq for SendPollParams
impl PartialEq for SendPollParams
source§fn eq(&self, other: &SendPollParams) -> bool
fn eq(&self, other: &SendPollParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SendPollParams
impl Serialize for SendPollParams
impl Eq for SendPollParams
impl StructuralPartialEq for SendPollParams
Auto Trait Implementations§
impl Freeze for SendPollParams
impl RefUnwindSafe for SendPollParams
impl Send for SendPollParams
impl Sync for SendPollParams
impl Unpin for SendPollParams
impl UnwindSafe for SendPollParams
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