pub struct KeyboardButtonPollTypeBuilder {
pub tg_type: Option<String>,
}Expand description
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
Fields§
§tg_type: Option<String>Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.
Implementations§
Source§impl KeyboardButtonPollTypeBuilder
impl KeyboardButtonPollTypeBuilder
pub fn new() -> Self
Sourcepub fn set_type(self, tg_type: String) -> Self
pub fn set_type(self, tg_type: String) -> Self
Optional. If quiz is passed, the user will be allowed to create only polls in the quiz mode. If regular is passed, only regular polls will be allowed. Otherwise, the user will be allowed to create a poll of any type.
pub fn build(self) -> KeyboardButtonPollType
Trait Implementations§
Source§impl Clone for KeyboardButtonPollTypeBuilder
impl Clone for KeyboardButtonPollTypeBuilder
Source§fn clone(&self) -> KeyboardButtonPollTypeBuilder
fn clone(&self) -> KeyboardButtonPollTypeBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for KeyboardButtonPollTypeBuilder
impl Default for KeyboardButtonPollTypeBuilder
Source§fn default() -> KeyboardButtonPollTypeBuilder
fn default() -> KeyboardButtonPollTypeBuilder
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KeyboardButtonPollTypeBuilder
impl<'de> Deserialize<'de> for KeyboardButtonPollTypeBuilder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for KeyboardButtonPollTypeBuilder
impl Hash for KeyboardButtonPollTypeBuilder
Source§impl Ord for KeyboardButtonPollTypeBuilder
impl Ord for KeyboardButtonPollTypeBuilder
Source§fn cmp(&self, other: &KeyboardButtonPollTypeBuilder) -> Ordering
fn cmp(&self, other: &KeyboardButtonPollTypeBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for KeyboardButtonPollTypeBuilder
impl PartialEq for KeyboardButtonPollTypeBuilder
Source§fn eq(&self, other: &KeyboardButtonPollTypeBuilder) -> bool
fn eq(&self, other: &KeyboardButtonPollTypeBuilder) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for KeyboardButtonPollTypeBuilder
impl PartialOrd for KeyboardButtonPollTypeBuilder
impl Eq for KeyboardButtonPollTypeBuilder
impl StructuralPartialEq for KeyboardButtonPollTypeBuilder
Auto Trait Implementations§
impl Freeze for KeyboardButtonPollTypeBuilder
impl RefUnwindSafe for KeyboardButtonPollTypeBuilder
impl Send for KeyboardButtonPollTypeBuilder
impl Sync for KeyboardButtonPollTypeBuilder
impl Unpin for KeyboardButtonPollTypeBuilder
impl UnsafeUnpin for KeyboardButtonPollTypeBuilder
impl UnwindSafe for KeyboardButtonPollTypeBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.