[−][src]Enum rtdlib::types::PollType
Describes the type of a poll
Variants
Quiz(PollTypeQuiz)
A poll in quiz mode, which has exactly one correct answer option and can be answered only once
Regular(PollTypeRegular)
A regular poll
Implementations
impl PollType
[src]
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
[src]
pub fn is_quiz(&self) -> bool
[src]
pub fn is_regular(&self) -> bool
[src]
pub fn on_quiz<F: FnOnce(&PollTypeQuiz)>(&self, fnc: F) -> &Self
[src]
pub fn on_regular<F: FnOnce(&PollTypeRegular)>(&self, fnc: F) -> &Self
[src]
pub fn as_quiz(&self) -> Option<&PollTypeQuiz>
[src]
pub fn as_regular(&self) -> Option<&PollTypeRegular>
[src]
pub fn quiz<T: AsRef<PollTypeQuiz>>(t: T) -> Self
[src]
pub fn regular<T: AsRef<PollTypeRegular>>(t: T) -> Self
[src]
Trait Implementations
impl AsRef<PollType> for PollType
[src]
impl Clone for PollType
[src]
impl Debug for PollType
[src]
impl Default for PollType
[src]
impl<'de> Deserialize<'de> for PollType
[src]
fn deserialize<D>(deserializer: D) -> Result<PollType, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl RObject for PollType
[src]
impl Serialize for PollType
[src]
Auto Trait Implementations
impl RefUnwindSafe for PollType
impl Send for PollType
impl Sync for PollType
impl Unpin for PollType
impl UnwindSafe for PollType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,