pub enum ChatMigration {
To {
chat_id: ChatId,
},
From {
chat_id: ChatId,
},
}
Expand description
Represents group migration to a supergroup or a supergroup migration from a group.
Note that bot receives both updates. For example: a group with id 0
migrates to a supergroup with id 1
bots in that group will receive 2
updates:
message.chat.id = 0
,message.chat_migration() = ChatMigration::To { chat_id: 1 }
message.chat.id = 1
,message.chat_migration() = ChatMigration::From { chat_id: 0 }
Variants§
To
The group has been migrated to a supergroup with the specified
identifier chat_id
.
From
The supergroup has been migrated from a group with the specified
identifier chat_id
.
Trait Implementations§
Source§impl Clone for ChatMigration
impl Clone for ChatMigration
Source§fn clone(&self) -> ChatMigration
fn clone(&self) -> ChatMigration
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 Debug for ChatMigration
impl Debug for ChatMigration
Source§impl<'de> Deserialize<'de> for ChatMigration
impl<'de> Deserialize<'de> for ChatMigration
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 PartialEq for ChatMigration
impl PartialEq for ChatMigration
Source§impl Serialize for ChatMigration
impl Serialize for ChatMigration
impl Copy for ChatMigration
impl StructuralPartialEq for ChatMigration
Auto Trait Implementations§
impl Freeze for ChatMigration
impl RefUnwindSafe for ChatMigration
impl Send for ChatMigration
impl Sync for ChatMigration
impl Unpin for ChatMigration
impl UnwindSafe for ChatMigration
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<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more