Enum rtdlib::types::CheckChatUsernameResult [−][src]
pub enum CheckChatUsernameResult {
CheckChatUsername(CheckChatUsername),
Ok(CheckChatUsernameResultOk),
PublicChatsTooMuch(CheckChatUsernameResultPublicChatsTooMuch),
PublicGroupsUnavailable(CheckChatUsernameResultPublicGroupsUnavailable),
UsernameInvalid(CheckChatUsernameResultUsernameInvalid),
UsernameOccupied(CheckChatUsernameResultUsernameOccupied),
// some variants omitted
}
Expand description
Represents result of checking whether a username can be set for a chat
Variants
Checks whether a username can be set for a chat
Tuple Fields of CheckChatUsername
The username can be set
Tuple Fields of Ok
The user has too much chats with username, one of them should be made private first
Tuple Fields of PublicChatsTooMuch
The user can’t be a member of a public supergroup
The username is invalid
Tuple Fields of UsernameInvalid
The username is occupied
Tuple Fields of UsernameOccupied
Implementations
pub fn on_public_chats_too_much<F: FnOnce(&CheckChatUsernameResultPublicChatsTooMuch)>(
&self,
fnc: F
) -> &Self
pub fn on_username_invalid<F: FnOnce(&CheckChatUsernameResultUsernameInvalid)>(
&self,
fnc: F
) -> &Self
pub fn on_username_occupied<F: FnOnce(&CheckChatUsernameResultUsernameOccupied)>(
&self,
fnc: F
) -> &Self
pub fn public_chats_too_much<T: AsRef<CheckChatUsernameResultPublicChatsTooMuch>>(
t: T
) -> Self
Trait Implementations
Performs the conversion.
fn deserialize<D>(deserializer: D) -> Result<CheckChatUsernameResult, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<CheckChatUsernameResult, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for CheckChatUsernameResult
impl Send for CheckChatUsernameResult
impl Sync for CheckChatUsernameResult
impl Unpin for CheckChatUsernameResult
impl UnwindSafe for CheckChatUsernameResult
Blanket Implementations
Mutably borrows from an owned value. Read more