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

pub struct Any { /* fields omitted */ }

Represents a poll that will be sent to a user.

Implementations

impl Any[src]

#[must_use]pub fn new(
    question: impl Into<String>,
    options: impl Into<Vec<String>>,
    kind: impl Into<Kind>
) -> Self
[src]

Constructs a poll.

#[must_use]pub const fn is_immediately_closed(self, is_closed: bool) -> Self[src]

Configures if the poll is immediately closed.

#[must_use]pub const fn is_anonymous(self, is_anonymous: bool) -> Self[src]

Comfigures if the poll is anonymous.

#[must_use]pub const fn auto_close(self, auto_close: AutoClose) -> Self[src]

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 Eq for Any[src]

impl Hash for Any[src]

impl PartialEq<Any> for Any[src]

impl Serialize 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
[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> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<T> WithSubscriber for T[src]