Struct botapi::gen_types::PollAnswerBuilder
source · pub struct PollAnswerBuilder {
pub poll_id: String,
pub voter_chat: Option<BoxWrapper<Unbox<Chat>>>,
pub user: Option<BoxWrapper<Unbox<User>>>,
pub option_ids: Vec<i64>,
}
Expand description
This object represents an answer of a user in a non-anonymous poll.
Fields§
§poll_id: String
Unique poll identifier
voter_chat: Option<BoxWrapper<Unbox<Chat>>>
Optional. The chat that changed the answer to the poll, if the voter is anonymous
user: Option<BoxWrapper<Unbox<User>>>
Optional. The user that changed the answer to the poll, if the voter isn’t anonymous
option_ids: Vec<i64>
0-based identifiers of chosen answer options. May be empty if the vote was retracted.
Implementations§
source§impl PollAnswerBuilder
impl PollAnswerBuilder
pub fn new(poll_id: String, option_ids: Vec<i64>) -> Self
sourcepub fn set_poll_id(self, poll_id: String) -> Self
pub fn set_poll_id(self, poll_id: String) -> Self
Unique poll identifier
sourcepub fn set_voter_chat(self, voter_chat: Chat) -> Self
pub fn set_voter_chat(self, voter_chat: Chat) -> Self
Optional. The chat that changed the answer to the poll, if the voter is anonymous
sourcepub fn set_user(self, user: User) -> Self
pub fn set_user(self, user: User) -> Self
Optional. The user that changed the answer to the poll, if the voter isn’t anonymous
sourcepub fn set_option_ids(self, option_ids: Vec<i64>) -> Self
pub fn set_option_ids(self, option_ids: Vec<i64>) -> Self
0-based identifiers of chosen answer options. May be empty if the vote was retracted.
pub fn build(self) -> PollAnswer
Trait Implementations§
source§impl Clone for PollAnswerBuilder
impl Clone for PollAnswerBuilder
source§fn clone(&self) -> PollAnswerBuilder
fn clone(&self) -> PollAnswerBuilder
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 PollAnswerBuilder
impl Debug for PollAnswerBuilder
source§impl Default for PollAnswerBuilder
impl Default for PollAnswerBuilder
source§fn default() -> PollAnswerBuilder
fn default() -> PollAnswerBuilder
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PollAnswerBuilder
impl<'de> Deserialize<'de> for PollAnswerBuilder
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 Hash for PollAnswerBuilder
impl Hash for PollAnswerBuilder
source§impl Ord for PollAnswerBuilder
impl Ord for PollAnswerBuilder
source§fn cmp(&self, other: &PollAnswerBuilder) -> Ordering
fn cmp(&self, other: &PollAnswerBuilder) -> 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 PollAnswerBuilder
impl PartialEq for PollAnswerBuilder
source§fn eq(&self, other: &PollAnswerBuilder) -> bool
fn eq(&self, other: &PollAnswerBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PollAnswerBuilder
impl PartialOrd for PollAnswerBuilder
source§fn partial_cmp(&self, other: &PollAnswerBuilder) -> Option<Ordering>
fn partial_cmp(&self, other: &PollAnswerBuilder) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for PollAnswerBuilder
impl Serialize for PollAnswerBuilder
impl Eq for PollAnswerBuilder
impl StructuralPartialEq for PollAnswerBuilder
Auto Trait Implementations§
impl Freeze for PollAnswerBuilder
impl RefUnwindSafe for PollAnswerBuilder
impl Send for PollAnswerBuilder
impl Sync for PollAnswerBuilder
impl Unpin for PollAnswerBuilder
impl UnwindSafe for PollAnswerBuilder
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.