[][src]Struct tbot::types::parameters::poll::Poll

pub struct Poll<'a> { /* fields omitted */ }

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]

Constructs a quiz.

#[must_use] pub fn regular(
    question: &'a str,
    options: &'a [&'a str],
    answers: Answer
) -> Self
[src]

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]

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.