#[non_exhaustive]pub struct Results {
pub is_finalized: bool,
pub answer_counts: Vec<AnswerCount>,
}Expand description
The results of a poll.
While a poll is running, the counts are usually but not always accurate; after it ends, a
final tally runs, and once is_finalized is true they are exact. An
answer without an entry in answer_counts has no votes.
discord.js counterpart: APIPollResults (discord-api-types).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.is_finalized: boolWhether the votes have been precisely counted.
answer_counts: Vec<AnswerCount>The counts per answer.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Results
impl<'de> Deserialize<'de> for Results
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
impl Eq for Results
impl StructuralPartialEq for Results
Auto Trait Implementations§
impl Forget for Results
impl Freeze for Results
impl Move for Results
impl RefUnwindSafe for Results
impl Send for Results
impl Sync for Results
impl Unpin for Results
impl UnsafeUnpin for Results
impl UnwindSafe for Results
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