[−][src]Enum rtdlib::types::OptionValue
Represents the value of an option
Variants
GetOption(GetOption)
Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization
Boolean(OptionValueBoolean)
Represents a boolean option
Empty(OptionValueEmpty)
Represents an unknown option or an option which has a default value
Integer(OptionValueInteger)
Represents an integer option
String(OptionValueString)
Represents a string option
Implementations
impl OptionValue
[src]
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
[src]
pub fn is_get_option(&self) -> bool
[src]
pub fn is_boolean(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn is_integer(&self) -> bool
[src]
pub fn is_string(&self) -> bool
[src]
pub fn on_get_option<F: FnOnce(&GetOption)>(&self, fnc: F) -> &Self
[src]
pub fn on_boolean<F: FnOnce(&OptionValueBoolean)>(&self, fnc: F) -> &Self
[src]
pub fn on_empty<F: FnOnce(&OptionValueEmpty)>(&self, fnc: F) -> &Self
[src]
pub fn on_integer<F: FnOnce(&OptionValueInteger)>(&self, fnc: F) -> &Self
[src]
pub fn on_string<F: FnOnce(&OptionValueString)>(&self, fnc: F) -> &Self
[src]
pub fn as_get_option(&self) -> Option<&GetOption>
[src]
pub fn as_boolean(&self) -> Option<&OptionValueBoolean>
[src]
pub fn as_empty(&self) -> Option<&OptionValueEmpty>
[src]
pub fn as_integer(&self) -> Option<&OptionValueInteger>
[src]
pub fn as_string(&self) -> Option<&OptionValueString>
[src]
pub fn get_option<T: AsRef<GetOption>>(t: T) -> Self
[src]
pub fn boolean<T: AsRef<OptionValueBoolean>>(t: T) -> Self
[src]
pub fn empty<T: AsRef<OptionValueEmpty>>(t: T) -> Self
[src]
pub fn integer<T: AsRef<OptionValueInteger>>(t: T) -> Self
[src]
pub fn string<T: AsRef<OptionValueString>>(t: T) -> Self
[src]
Trait Implementations
impl AsRef<OptionValue> for OptionValue
[src]
fn as_ref(&self) -> &OptionValue
[src]
impl Clone for OptionValue
[src]
fn clone(&self) -> OptionValue
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for OptionValue
[src]
impl Default for OptionValue
[src]
impl<'de> Deserialize<'de> for OptionValue
[src]
fn deserialize<D>(deserializer: D) -> Result<OptionValue, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl RObject for OptionValue
[src]
impl Serialize for OptionValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for OptionValue
impl Send for OptionValue
impl Sync for OptionValue
impl Unpin for OptionValue
impl UnwindSafe for OptionValue
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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>,