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

pub struct Any { /* fields omitted */ }

Represents a poll that will be sent to a user.


impl Any[src]

pub fn new(
    question: impl Into<String>,
    options: impl Into<Vec<String>>,
    kind: impl Into<Kind>
) -> Self

Constructs a poll.

pub const fn is_immediately_closed(self, is_closed: bool) -> Self

Configures if the poll is immediately closed.

pub const fn is_anonymous(self, is_anonymous: bool) -> Self

Comfigures if the poll is anonymous.

pub const fn auto_close(self, auto_close: AutoClose) -> Self

Configures when the poll is automatically closed. Reflects the open_period and close_date parameters.

Trait Implementations

impl Clone for Any[src]

impl Debug for Any[src]

impl Hash for Any[src]

impl PartialEq<Any> for Any[src]

impl Serialize for Any[src]

impl Eq for Any[src]

impl StructuralEq for Any[src]

impl StructuralPartialEq for Any[src]

Auto Trait Implementations

impl RefUnwindSafe for Any

impl Send for Any

impl Sync for Any

impl Unpin for Any

impl UnwindSafe for Any

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.