Struct carapax::types::PollAnswer
source · pub struct PollAnswer {
pub option_ids: Vec<i64>,
pub poll_id: String,
pub voter: PollAnswerVoter,
}
Expand description
Represents an answer of a user in a non-anonymous poll.
Fields§
§option_ids: Vec<i64>
0-based identifiers of answer options, chosen by the user.
May be empty if the user retracted their vote.
poll_id: String
Unique poll identifier.
voter: PollAnswerVoter
The chat or the user that changed answer to the poll.
Implementations§
source§impl PollAnswer
impl PollAnswer
sourcepub fn new<A, B, C>(option_ids: A, poll_id: B, voter: C) -> PollAnswer
pub fn new<A, B, C>(option_ids: A, poll_id: B, voter: C) -> PollAnswer
Creates a new PollAnswer
.
§Arguments
option_ids
- 0-based identifiers of answer options, chosen by the user.poll_id
- Unique poll identifier.voter
- The chat or the user that changed answer to the poll.
Trait Implementations§
source§impl Clone for PollAnswer
impl Clone for PollAnswer
source§fn clone(&self) -> PollAnswer
fn clone(&self) -> PollAnswer
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 PollAnswer
impl Debug for PollAnswer
source§impl<'de> Deserialize<'de> for PollAnswer
impl<'de> Deserialize<'de> for PollAnswer
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<PollAnswer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<PollAnswer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for PollAnswer
impl PartialEq for PollAnswer
source§fn eq(&self, other: &PollAnswer) -> bool
fn eq(&self, other: &PollAnswer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PollAnswer
impl Serialize for PollAnswer
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<Update> for PollAnswer
impl TryFrom<Update> for PollAnswer
§type Error = UnexpectedUpdate
type Error = UnexpectedUpdate
The type returned in the event of a conversion error.
source§fn try_from(
value: Update
) -> Result<PollAnswer, <PollAnswer as TryFrom<Update>>::Error>
fn try_from( value: Update ) -> Result<PollAnswer, <PollAnswer as TryFrom<Update>>::Error>
Performs the conversion.
source§impl TryFromInput for PollAnswer
impl TryFromInput for PollAnswer
§type Error = Infallible
type Error = Infallible
An error when conversion failed.
source§async fn try_from_input(
input: HandlerInput
) -> Result<Option<Self>, Self::Error>
async fn try_from_input( input: HandlerInput ) -> Result<Option<Self>, Self::Error>
Performs conversion. Read more
impl StructuralPartialEq for PollAnswer
Auto Trait Implementations§
impl Freeze for PollAnswer
impl RefUnwindSafe for PollAnswer
impl Send for PollAnswer
impl Sync for PollAnswer
impl Unpin for PollAnswer
impl UnwindSafe for PollAnswer
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more