pub struct SendPollBuilder { /* private fields */ }Expand description
Builder for the SendPoll structure
Implementations§
Source§impl SendPollBuilder
impl SendPollBuilder
Sourcepub fn new(chat_id: ChatId, question: String) -> Self
pub fn new(chat_id: ChatId, question: String) -> Self
Instantiate the builder with the fields message_thread_id, chat_id, question, options, is_anonymous, _type, allows_multiple_answers, correct_option_id, explanation, explanation_parse_mode, explanation_entities, open_period, close_date, is_closed, disable_notification, protect_content, reply_to_message_id, allow_sending_without_reply, reply_markup
Sourcepub fn message_thread_id(self, val: i64) -> Self
pub fn message_thread_id(self, val: i64) -> Self
Set the field message_thread_id to the given value
Sourcepub fn is_anonymous(self, val: bool) -> Self
pub fn is_anonymous(self, val: bool) -> Self
Set the field is_anonymous to the given value
Sourcepub fn allows_multiple_answers(self, val: bool) -> Self
pub fn allows_multiple_answers(self, val: bool) -> Self
Set the field allows_multiple_answers to the given value
Sourcepub fn correct_option_id(self, val: i64) -> Self
pub fn correct_option_id(self, val: i64) -> Self
Set the field correct_option_id to the given value
Sourcepub fn explanation(self, val: String) -> Self
pub fn explanation(self, val: String) -> Self
Set the field explanation to the given value
Sourcepub fn explanation_parse_mode(self, val: String) -> Self
pub fn explanation_parse_mode(self, val: String) -> Self
Set the field explanation_parse_mode to the given value
Sourcepub fn explanation_entities(self, val: Vec<MessageEntity>) -> Self
pub fn explanation_entities(self, val: Vec<MessageEntity>) -> Self
Set the field explanation_entities to the given value
Sourcepub fn open_period(self, val: i64) -> Self
pub fn open_period(self, val: i64) -> Self
Set the field open_period to the given value
Sourcepub fn close_date(self, val: i64) -> Self
pub fn close_date(self, val: i64) -> Self
Set the field close_date to the given value
Sourcepub fn disable_notification(self, val: bool) -> Self
pub fn disable_notification(self, val: bool) -> Self
Set the field disable_notification to the given value
Sourcepub fn protect_content(self, val: bool) -> Self
pub fn protect_content(self, val: bool) -> Self
Set the field protect_content to the given value
Sourcepub fn reply_to_message_id(self, val: i64) -> Self
pub fn reply_to_message_id(self, val: i64) -> Self
Set the field reply_to_message_id to the given value
Sourcepub fn allow_sending_without_reply(self, val: bool) -> Self
pub fn allow_sending_without_reply(self, val: bool) -> Self
Set the field allow_sending_without_reply to the given value
Sourcepub fn reply_markup(self, val: ReplyMarkup) -> Self
pub fn reply_markup(self, val: ReplyMarkup) -> Self
Set the field reply_markup to the given value