[−][src]Struct tbot::types::parameters::poll::Poll
Represents a poll that will be sent to a user.
Methods
impl<'a> Poll<'a>
[src]
#[must_use]
pub fn quiz(
question: &'a str,
options: &'a [&'a str],
correct_option_id: usize
) -> Self
[src]
question: &'a str,
options: &'a [&'a str],
correct_option_id: usize
) -> Self
Constructs a quiz.
#[must_use]
pub fn regular(
question: &'a str,
options: &'a [&'a str],
answers: Answer
) -> Self
[src]
question: &'a str,
options: &'a [&'a str],
answers: Answer
) -> Self
Constructs a regular poll.
#[must_use]
pub fn immediately_closed(self, is_closed: bool) -> Self
[src]
Configures if the poll is immediately closed.
#[must_use]
pub fn anonymous(self, is_anonymous: bool) -> Self
[src]
Comfigures if the poll is anonymous.
Trait Implementations
impl<'a> Clone for Poll<'a>
[src]
impl<'a> Copy for Poll<'a>
[src]
impl<'a> Debug for Poll<'a>
[src]
impl<'a> Serialize for Poll<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Poll<'a>
impl<'a> Send for Poll<'a>
impl<'a> Sync for Poll<'a>
impl<'a> Unpin for Poll<'a>
impl<'a> UnwindSafe for Poll<'a>
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> 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>,