#[repr(i32)]pub enum GetChatHistoryMode {
HistoryModeUnspecified = 0,
HistoryModeLatest = 1,
HistoryModeOlder = 2,
HistoryModeNewer = 3,
HistoryModeAround = 4,
}Variants§
HistoryModeUnspecified = 0
HistoryModeLatest = 1
HistoryModeOlder = 2
HistoryModeNewer = 3
HistoryModeAround = 4
Implementations§
Source§impl GetChatHistoryMode
impl GetChatHistoryMode
Sourcepub fn from_i32(value: i32) -> Option<GetChatHistoryMode>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<GetChatHistoryMode>
Use the TryFrom<i32> implementation instead
Converts an i32 to a GetChatHistoryMode, or None if value is not a valid variant.
Source§impl GetChatHistoryMode
impl GetChatHistoryMode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<GetChatHistoryMode>
pub fn from_str_name(value: &str) -> Option<GetChatHistoryMode>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for GetChatHistoryMode
impl Clone for GetChatHistoryMode
Source§fn clone(&self) -> GetChatHistoryMode
fn clone(&self) -> GetChatHistoryMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GetChatHistoryMode
Source§impl Debug for GetChatHistoryMode
impl Debug for GetChatHistoryMode
Source§impl Default for GetChatHistoryMode
impl Default for GetChatHistoryMode
Source§fn default() -> GetChatHistoryMode
fn default() -> GetChatHistoryMode
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GetChatHistoryMode
impl<'de> Deserialize<'de> for GetChatHistoryMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetChatHistoryMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GetChatHistoryMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for GetChatHistoryMode
Source§impl Hash for GetChatHistoryMode
impl Hash for GetChatHistoryMode
Source§impl Ord for GetChatHistoryMode
impl Ord for GetChatHistoryMode
Source§fn cmp(&self, other: &GetChatHistoryMode) -> Ordering
fn cmp(&self, other: &GetChatHistoryMode) -> Ordering
1.21.0 (const: unstable) · 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 GetChatHistoryMode
impl PartialEq for GetChatHistoryMode
Source§fn eq(&self, other: &GetChatHistoryMode) -> bool
fn eq(&self, other: &GetChatHistoryMode) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for GetChatHistoryMode
impl PartialOrd for GetChatHistoryMode
Source§impl Serialize for GetChatHistoryMode
impl Serialize for GetChatHistoryMode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for GetChatHistoryMode
Source§impl TryFrom<i32> for GetChatHistoryMode
impl TryFrom<i32> for GetChatHistoryMode
Source§type Error = DecodeError
type Error = DecodeError
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<GetChatHistoryMode, DecodeError>
fn try_from(value: i32) -> Result<GetChatHistoryMode, DecodeError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for GetChatHistoryMode
impl RefUnwindSafe for GetChatHistoryMode
impl Send for GetChatHistoryMode
impl Sync for GetChatHistoryMode
impl Unpin for GetChatHistoryMode
impl UnsafeUnpin for GetChatHistoryMode
impl UnwindSafe for GetChatHistoryMode
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