Struct frankenstein::objects::Poll[][src]

pub struct Poll {
Show fields pub id: String, pub question: String, pub options: Vec<PollOption>, pub total_voter_count: isize, pub is_closed: bool, pub is_anonymous: bool, pub type_field: String, pub allows_multiple_answers: bool, pub correct_option_id: Option<isize>, pub explanation: Option<String>, pub explanation_entities: Option<Vec<MessageEntity>>, pub open_period: Option<isize>, pub close_date: Option<isize>,
}

Fields

id: Stringquestion: Stringoptions: Vec<PollOption>total_voter_count: isizeis_closed: boolis_anonymous: booltype_field: Stringallows_multiple_answers: boolcorrect_option_id: Option<isize>explanation: Option<String>explanation_entities: Option<Vec<MessageEntity>>open_period: Option<isize>close_date: Option<isize>

Implementations

impl Poll[src]

pub fn new(
    id: String,
    question: String,
    options: Vec<PollOption>,
    total_voter_count: isize,
    is_closed: bool,
    is_anonymous: bool,
    type_field: String,
    allows_multiple_answers: bool
) -> Self
[src]

pub fn set_id(&mut self, id: String)[src]

pub fn set_question(&mut self, question: String)[src]

pub fn set_options(&mut self, options: Vec<PollOption>)[src]

pub fn set_total_voter_count(&mut self, total_voter_count: isize)[src]

pub fn set_is_closed(&mut self, is_closed: bool)[src]

pub fn set_is_anonymous(&mut self, is_anonymous: bool)[src]

pub fn set_type_field(&mut self, type_field: String)[src]

pub fn set_allows_multiple_answers(&mut self, allows_multiple_answers: bool)[src]

pub fn set_correct_option_id(&mut self, correct_option_id: Option<isize>)[src]

pub fn set_explanation(&mut self, explanation: Option<String>)[src]

pub fn set_explanation_entities(
    &mut self,
    explanation_entities: Option<Vec<MessageEntity>>
)
[src]

pub fn set_open_period(&mut self, open_period: Option<isize>)[src]

pub fn set_close_date(&mut self, close_date: Option<isize>)[src]

pub fn id(&self) -> String[src]

pub fn question(&self) -> String[src]

pub fn options(&self) -> Vec<PollOption>[src]

pub fn total_voter_count(&self) -> isize[src]

pub fn is_closed(&self) -> bool[src]

pub fn is_anonymous(&self) -> bool[src]

pub fn type_field(&self) -> String[src]

pub fn allows_multiple_answers(&self) -> bool[src]

pub fn correct_option_id(&self) -> Option<isize>[src]

pub fn explanation(&self) -> Option<String>[src]

pub fn explanation_entities(&self) -> Option<Vec<MessageEntity>>[src]

pub fn open_period(&self) -> Option<isize>[src]

pub fn close_date(&self) -> Option<isize>[src]

Trait Implementations

impl Clone for Poll[src]

fn clone(&self) -> Poll[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Poll[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for Poll[src]

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
    __D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl PartialEq<Poll> for Poll[src]

fn eq(&self, other: &Poll) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Poll) -> bool[src]

This method tests for !=.

impl Serialize for Poll[src]

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
    __S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl StructuralPartialEq for Poll[src]

Auto Trait Implementations

impl RefUnwindSafe for Poll

impl Send for Poll

impl Sync for Poll

impl Unpin for Poll

impl UnwindSafe for Poll

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> CloneAny for T where
    T: Any + Clone

pub fn clone_any(&self) -> Box<dyn CloneAny + 'static, Global>

pub fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send, Global> where
    T: Send

pub fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync, Global> where
    T: Sync

pub fn clone_any_send_sync(
    &self
) -> Box<dyn CloneAny + 'static + Sync + Send, Global> where
    T: Send + Sync

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> DebugAny for T where
    T: Any + Debug

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> UnsafeAny for T where
    T: Any