pub enum ChatActionBar {
AddContact(ChatActionBarAddContact),
InviteMembers(ChatActionBarInviteMembers),
JoinRequest(ChatActionBarJoinRequest),
ReportAddBlock(ChatActionBarReportAddBlock),
ReportSpam(ChatActionBarReportSpam),
ReportUnrelatedLocation(ChatActionBarReportUnrelatedLocation),
SharePhoneNumber(ChatActionBarSharePhoneNumber),
// some variants omitted
}
Expand description
Describes actions which must be possible to do through a chat action bar
Variants§
AddContact(ChatActionBarAddContact)
The chat is a private or secret chat and the other user can be added to the contact list using the method addContact
InviteMembers(ChatActionBarInviteMembers)
The chat is a recently created group chat to which new members can be invited
JoinRequest(ChatActionBarJoinRequest)
The chat is a private chat with an administrator of a chat to which the user sent join request
ReportAddBlock(ChatActionBarReportAddBlock)
The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method toggleMessageSenderIsBlocked, or the other user can be added to the contact list using the method addContact
ReportSpam(ChatActionBarReportSpam)
The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam
The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation
The chat is a private or secret chat with a mutual contact and the user’s phone number can be shared with the other user using the method sharePhoneNumber
Implementations§
Source§impl ChatActionBar
impl ChatActionBar
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
pub fn is_add_contact(&self) -> bool
pub fn is_invite_members(&self) -> bool
pub fn is_join_request(&self) -> bool
pub fn is_report_add_block(&self) -> bool
pub fn is_report_spam(&self) -> bool
pub fn on_add_contact<F: FnOnce(&ChatActionBarAddContact)>( &self, fnc: F, ) -> &Self
pub fn on_invite_members<F: FnOnce(&ChatActionBarInviteMembers)>( &self, fnc: F, ) -> &Self
pub fn on_join_request<F: FnOnce(&ChatActionBarJoinRequest)>( &self, fnc: F, ) -> &Self
pub fn on_report_add_block<F: FnOnce(&ChatActionBarReportAddBlock)>( &self, fnc: F, ) -> &Self
pub fn on_report_spam<F: FnOnce(&ChatActionBarReportSpam)>( &self, fnc: F, ) -> &Self
pub fn as_add_contact(&self) -> Option<&ChatActionBarAddContact>
pub fn as_invite_members(&self) -> Option<&ChatActionBarInviteMembers>
pub fn as_join_request(&self) -> Option<&ChatActionBarJoinRequest>
pub fn as_report_add_block(&self) -> Option<&ChatActionBarReportAddBlock>
pub fn as_report_spam(&self) -> Option<&ChatActionBarReportSpam>
pub fn add_contact<T: AsRef<ChatActionBarAddContact>>(t: T) -> Self
pub fn invite_members<T: AsRef<ChatActionBarInviteMembers>>(t: T) -> Self
pub fn join_request<T: AsRef<ChatActionBarJoinRequest>>(t: T) -> Self
pub fn report_add_block<T: AsRef<ChatActionBarReportAddBlock>>(t: T) -> Self
pub fn report_spam<T: AsRef<ChatActionBarReportSpam>>(t: T) -> Self
Trait Implementations§
Source§impl AsRef<ChatActionBar> for ChatActionBar
impl AsRef<ChatActionBar> for ChatActionBar
Source§fn as_ref(&self) -> &ChatActionBar
fn as_ref(&self) -> &ChatActionBar
Source§impl Clone for ChatActionBar
impl Clone for ChatActionBar
Source§fn clone(&self) -> ChatActionBar
fn clone(&self) -> ChatActionBar
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more