pub struct XftpClient<C> { /* private fields */ }Available on crate feature
xftp only.Expand description
A ClientApi wrapper that intercepts file-result events and routes them to the
corresponding DownloadFileBuilder futures. Should be constructed by
EventStream::hook_xftp to work correctly.
Implementations§
Source§impl XftpClient<Client>
impl XftpClient<Client>
pub fn disconnect(self) -> impl Future<Output = ()>
Available on crate feature
websocket only.Source§impl XftpClient<Client>
impl XftpClient<Client>
pub fn disconnect(self) -> impl Future<Output = ()>
Available on crate feature
ffi only.Trait Implementations§
Source§impl<C: ClientApi> ClientApi for XftpClient<C>
impl<C: ClientApi> ClientApi for XftpClient<C>
type ResponseShape<'de, T: 'de + Deserialize<'de>> = <C as ClientApi>::ResponseShape<'de, T>
type Error = <C as ClientApi>::Error
fn send_raw( &self, command: String, ) -> impl Future<Output = Result<String, Self::Error>> + Send
Source§fn cancel_file(
&self,
file_id: i64,
) -> impl Future<Output = Result<CancelFileResponse, Self::Error>> + Send
fn cancel_file( &self, file_id: i64, ) -> impl Future<Output = Result<CancelFileResponse, Self::Error>> + Send
File commands Read more
fn send<C, R>( &self, cmd: C, ) -> impl Future<Output = Result<R, Self::Error>> + Send
Source§fn api_create_my_address(
&self,
user_id: i64,
) -> impl Future<Output = Result<Arc<UserContactLinkCreatedResponse>, Self::Error>> + Send
fn api_create_my_address( &self, user_id: i64, ) -> impl Future<Output = Result<Arc<UserContactLinkCreatedResponse>, Self::Error>> + Send
Address commands Read more
Source§fn api_delete_my_address(
&self,
user_id: i64,
) -> impl Future<Output = Result<Arc<UserContactLinkDeletedResponse>, Self::Error>> + Send
fn api_delete_my_address( &self, user_id: i64, ) -> impl Future<Output = Result<Arc<UserContactLinkDeletedResponse>, Self::Error>> + Send
Address commands Read more
Source§fn api_show_my_address(
&self,
user_id: i64,
) -> impl Future<Output = Result<Arc<UserContactLinkResponse>, Self::Error>> + Send
fn api_show_my_address( &self, user_id: i64, ) -> impl Future<Output = Result<Arc<UserContactLinkResponse>, Self::Error>> + Send
Address commands Read more
Source§fn api_set_profile_address(
&self,
command: ApiSetProfileAddress,
) -> impl Future<Output = Result<Arc<UserProfileUpdatedResponse>, Self::Error>> + Send
fn api_set_profile_address( &self, command: ApiSetProfileAddress, ) -> impl Future<Output = Result<Arc<UserProfileUpdatedResponse>, Self::Error>> + Send
Address commands Read more
Source§fn api_set_address_settings(
&self,
user_id: i64,
settings: AddressSettings,
) -> impl Future<Output = Result<Arc<UserContactLinkUpdatedResponse>, Self::Error>> + Send
fn api_set_address_settings( &self, user_id: i64, settings: AddressSettings, ) -> impl Future<Output = Result<Arc<UserContactLinkUpdatedResponse>, Self::Error>> + Send
Address commands Read more
Source§fn api_send_messages(
&self,
command: ApiSendMessages,
) -> impl Future<Output = Result<Arc<NewChatItemsResponse>, Self::Error>> + Send
fn api_send_messages( &self, command: ApiSendMessages, ) -> impl Future<Output = Result<Arc<NewChatItemsResponse>, Self::Error>> + Send
Message commands Read more
Source§fn api_update_chat_item(
&self,
command: ApiUpdateChatItem,
) -> impl Future<Output = Result<ApiUpdateChatItemResponse, Self::Error>> + Send
fn api_update_chat_item( &self, command: ApiUpdateChatItem, ) -> impl Future<Output = Result<ApiUpdateChatItemResponse, Self::Error>> + Send
Message commands Read more
Source§fn api_delete_chat_item(
&self,
chat_ref: ChatRef,
chat_item_ids: Vec<i64>,
delete_mode: CIDeleteMode,
) -> impl Future<Output = Result<Arc<ChatItemsDeletedResponse>, Self::Error>> + Send
fn api_delete_chat_item( &self, chat_ref: ChatRef, chat_item_ids: Vec<i64>, delete_mode: CIDeleteMode, ) -> impl Future<Output = Result<Arc<ChatItemsDeletedResponse>, Self::Error>> + Send
Message commands Read more
Source§fn api_delete_member_chat_item(
&self,
group_id: i64,
chat_item_ids: Vec<i64>,
) -> impl Future<Output = Result<Arc<ChatItemsDeletedResponse>, Self::Error>> + Send
fn api_delete_member_chat_item( &self, group_id: i64, chat_item_ids: Vec<i64>, ) -> impl Future<Output = Result<Arc<ChatItemsDeletedResponse>, Self::Error>> + Send
Message commands Read more
Source§fn api_chat_item_reaction(
&self,
command: ApiChatItemReaction,
) -> impl Future<Output = Result<Arc<ChatItemReactionResponse>, Self::Error>> + Send
fn api_chat_item_reaction( &self, command: ApiChatItemReaction, ) -> impl Future<Output = Result<Arc<ChatItemReactionResponse>, Self::Error>> + Send
Message commands Read more
Source§fn receive_file(
&self,
command: ReceiveFile,
) -> impl Future<Output = Result<ReceiveFileResponse, Self::Error>> + Send
fn receive_file( &self, command: ReceiveFile, ) -> impl Future<Output = Result<ReceiveFileResponse, Self::Error>> + Send
File commands Read more
Source§fn api_add_member(
&self,
group_id: i64,
contact_id: i64,
member_role: GroupMemberRole,
) -> impl Future<Output = Result<Arc<SentGroupInvitationResponse>, Self::Error>> + Send
fn api_add_member( &self, group_id: i64, contact_id: i64, member_role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<SentGroupInvitationResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_join_group(
&self,
group_id: i64,
) -> impl Future<Output = Result<Arc<UserAcceptedGroupSentResponse>, Self::Error>> + Send
fn api_join_group( &self, group_id: i64, ) -> impl Future<Output = Result<Arc<UserAcceptedGroupSentResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_accept_member(
&self,
group_id: i64,
group_member_id: i64,
member_role: GroupMemberRole,
) -> impl Future<Output = Result<Arc<MemberAcceptedResponse>, Self::Error>> + Send
fn api_accept_member( &self, group_id: i64, group_member_id: i64, member_role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<MemberAcceptedResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_members_role(
&self,
group_id: i64,
group_member_ids: Vec<i64>,
member_role: GroupMemberRole,
) -> impl Future<Output = Result<Arc<MembersRoleUserResponse>, Self::Error>> + Send
fn api_members_role( &self, group_id: i64, group_member_ids: Vec<i64>, member_role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<MembersRoleUserResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_block_members_for_all(
&self,
command: ApiBlockMembersForAll,
) -> impl Future<Output = Result<Arc<MembersBlockedForAllUserResponse>, Self::Error>> + Send
fn api_block_members_for_all( &self, command: ApiBlockMembersForAll, ) -> impl Future<Output = Result<Arc<MembersBlockedForAllUserResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_remove_members(
&self,
command: ApiRemoveMembers,
) -> impl Future<Output = Result<Arc<UserDeletedMembersResponse>, Self::Error>> + Send
fn api_remove_members( &self, command: ApiRemoveMembers, ) -> impl Future<Output = Result<Arc<UserDeletedMembersResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_leave_group(
&self,
group_id: i64,
) -> impl Future<Output = Result<Arc<LeftMemberUserResponse>, Self::Error>> + Send
fn api_leave_group( &self, group_id: i64, ) -> impl Future<Output = Result<Arc<LeftMemberUserResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_list_members(
&self,
group_id: i64,
) -> impl Future<Output = Result<Arc<GroupMembersResponse>, Self::Error>> + Send
fn api_list_members( &self, group_id: i64, ) -> impl Future<Output = Result<Arc<GroupMembersResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_new_group(
&self,
command: ApiNewGroup,
) -> impl Future<Output = Result<Arc<GroupCreatedResponse>, Self::Error>> + Send
fn api_new_group( &self, command: ApiNewGroup, ) -> impl Future<Output = Result<Arc<GroupCreatedResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_new_public_group(
&self,
command: ApiNewPublicGroup,
) -> impl Future<Output = Result<ApiNewPublicGroupResponse, Self::Error>> + Send
fn api_new_public_group( &self, command: ApiNewPublicGroup, ) -> impl Future<Output = Result<ApiNewPublicGroupResponse, Self::Error>> + Send
Group commands Read more
Source§fn api_get_group_relays(
&self,
group_id: i64,
) -> impl Future<Output = Result<Arc<GroupRelaysResponse>, Self::Error>> + Send
fn api_get_group_relays( &self, group_id: i64, ) -> impl Future<Output = Result<Arc<GroupRelaysResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_add_group_relays(
&self,
group_id: i64,
relay_ids: Vec<i64>,
) -> impl Future<Output = Result<ApiAddGroupRelaysResponse, Self::Error>> + Send
fn api_add_group_relays( &self, group_id: i64, relay_ids: Vec<i64>, ) -> impl Future<Output = Result<ApiAddGroupRelaysResponse, Self::Error>> + Send
Group commands Read more
Source§fn api_update_group_profile(
&self,
group_id: i64,
group_profile: GroupProfile,
) -> impl Future<Output = Result<Arc<GroupUpdatedResponse>, Self::Error>> + Send
fn api_update_group_profile( &self, group_id: i64, group_profile: GroupProfile, ) -> impl Future<Output = Result<Arc<GroupUpdatedResponse>, Self::Error>> + Send
Group commands Read more
Source§fn api_create_group_link(
&self,
group_id: i64,
member_role: GroupMemberRole,
) -> impl Future<Output = Result<Arc<GroupLinkCreatedResponse>, Self::Error>> + Send
fn api_create_group_link( &self, group_id: i64, member_role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<GroupLinkCreatedResponse>, Self::Error>> + Send
Group link commands Read more
Source§fn api_group_link_member_role(
&self,
group_id: i64,
member_role: GroupMemberRole,
) -> impl Future<Output = Result<Arc<GroupLinkResponse>, Self::Error>> + Send
fn api_group_link_member_role( &self, group_id: i64, member_role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<GroupLinkResponse>, Self::Error>> + Send
Group link commands Read more
Source§fn api_delete_group_link(
&self,
group_id: i64,
) -> impl Future<Output = Result<Arc<GroupLinkDeletedResponse>, Self::Error>> + Send
fn api_delete_group_link( &self, group_id: i64, ) -> impl Future<Output = Result<Arc<GroupLinkDeletedResponse>, Self::Error>> + Send
Group link commands Read more
Source§fn api_get_group_link(
&self,
group_id: i64,
) -> impl Future<Output = Result<Arc<GroupLinkResponse>, Self::Error>> + Send
fn api_get_group_link( &self, group_id: i64, ) -> impl Future<Output = Result<Arc<GroupLinkResponse>, Self::Error>> + Send
Group link commands Read more
Source§fn api_add_contact(
&self,
command: ApiAddContact,
) -> impl Future<Output = Result<Arc<InvitationResponse>, Self::Error>> + Send
fn api_add_contact( &self, command: ApiAddContact, ) -> impl Future<Output = Result<Arc<InvitationResponse>, Self::Error>> + Send
Connection commands Read more
Source§fn api_connect_plan(
&self,
command: ApiConnectPlan,
) -> impl Future<Output = Result<Arc<ConnectionPlanResponse>, Self::Error>> + Send
fn api_connect_plan( &self, command: ApiConnectPlan, ) -> impl Future<Output = Result<Arc<ConnectionPlanResponse>, Self::Error>> + Send
Connection commands Read more
Source§fn api_connect(
&self,
command: ApiConnect,
) -> impl Future<Output = Result<ApiConnectResponse, Self::Error>> + Send
fn api_connect( &self, command: ApiConnect, ) -> impl Future<Output = Result<ApiConnectResponse, Self::Error>> + Send
Connection commands Read more
Source§fn connect(
&self,
command: Connect,
) -> impl Future<Output = Result<ConnectResponse, Self::Error>> + Send
fn connect( &self, command: Connect, ) -> impl Future<Output = Result<ConnectResponse, Self::Error>> + Send
Connection commands Read more
Source§fn api_accept_contact(
&self,
contact_req_id: i64,
) -> impl Future<Output = Result<Arc<AcceptingContactRequestResponse>, Self::Error>> + Send
fn api_accept_contact( &self, contact_req_id: i64, ) -> impl Future<Output = Result<Arc<AcceptingContactRequestResponse>, Self::Error>> + Send
Connection commands Read more
Source§fn api_reject_contact(
&self,
contact_req_id: i64,
) -> impl Future<Output = Result<Arc<ContactRequestRejectedResponse>, Self::Error>> + Send
fn api_reject_contact( &self, contact_req_id: i64, ) -> impl Future<Output = Result<Arc<ContactRequestRejectedResponse>, Self::Error>> + Send
Connection commands Read more
Source§fn api_list_contacts(
&self,
user_id: i64,
) -> impl Future<Output = Result<Arc<ContactsListResponse>, Self::Error>> + Send
fn api_list_contacts( &self, user_id: i64, ) -> impl Future<Output = Result<Arc<ContactsListResponse>, Self::Error>> + Send
Chat commands Read more
Source§fn api_list_groups(
&self,
command: ApiListGroups,
) -> impl Future<Output = Result<Arc<GroupsListResponse>, Self::Error>> + Send
fn api_list_groups( &self, command: ApiListGroups, ) -> impl Future<Output = Result<Arc<GroupsListResponse>, Self::Error>> + Send
Chat commands Read more
Source§fn api_get_chats(
&self,
command: ApiGetChats,
) -> impl Future<Output = Result<Arc<ApiChatsResponse>, Self::Error>> + Send
fn api_get_chats( &self, command: ApiGetChats, ) -> impl Future<Output = Result<Arc<ApiChatsResponse>, Self::Error>> + Send
Chat commands Read more
Source§fn api_delete_chat(
&self,
chat_ref: ChatRef,
chat_delete_mode: ChatDeleteMode,
) -> impl Future<Output = Result<ApiDeleteChatResponse, Self::Error>> + Send
fn api_delete_chat( &self, chat_ref: ChatRef, chat_delete_mode: ChatDeleteMode, ) -> impl Future<Output = Result<ApiDeleteChatResponse, Self::Error>> + Send
Chat commands Read more
Source§fn api_set_group_custom_data(
&self,
command: ApiSetGroupCustomData,
) -> impl Future<Output = Result<Arc<CmdOkResponse>, Self::Error>> + Send
fn api_set_group_custom_data( &self, command: ApiSetGroupCustomData, ) -> impl Future<Output = Result<Arc<CmdOkResponse>, Self::Error>> + Send
Chat commands Read more
Source§fn api_set_contact_custom_data(
&self,
command: ApiSetContactCustomData,
) -> impl Future<Output = Result<Arc<CmdOkResponse>, Self::Error>> + Send
fn api_set_contact_custom_data( &self, command: ApiSetContactCustomData, ) -> impl Future<Output = Result<Arc<CmdOkResponse>, Self::Error>> + Send
Chat commands Read more
Source§fn api_set_user_auto_accept_member_contacts(
&self,
command: ApiSetUserAutoAcceptMemberContacts,
) -> impl Future<Output = Result<Arc<CmdOkResponse>, Self::Error>> + Send
fn api_set_user_auto_accept_member_contacts( &self, command: ApiSetUserAutoAcceptMemberContacts, ) -> impl Future<Output = Result<Arc<CmdOkResponse>, Self::Error>> + Send
Chat commands Read more
Source§fn show_active_user(
&self,
) -> impl Future<Output = Result<Arc<ActiveUserResponse>, Self::Error>> + Send
fn show_active_user( &self, ) -> impl Future<Output = Result<Arc<ActiveUserResponse>, Self::Error>> + Send
User profile commands Read more
Source§fn create_active_user(
&self,
new_user: NewUser,
) -> impl Future<Output = Result<Arc<ActiveUserResponse>, Self::Error>> + Send
fn create_active_user( &self, new_user: NewUser, ) -> impl Future<Output = Result<Arc<ActiveUserResponse>, Self::Error>> + Send
User profile commands Read more
Source§fn list_users(
&self,
) -> impl Future<Output = Result<Arc<UsersListResponse>, Self::Error>> + Send
fn list_users( &self, ) -> impl Future<Output = Result<Arc<UsersListResponse>, Self::Error>> + Send
User profile commands Read more
Source§fn api_set_active_user(
&self,
command: ApiSetActiveUser,
) -> impl Future<Output = Result<Arc<ActiveUserResponse>, Self::Error>> + Send
fn api_set_active_user( &self, command: ApiSetActiveUser, ) -> impl Future<Output = Result<Arc<ActiveUserResponse>, Self::Error>> + Send
User profile commands Read more
Source§fn api_delete_user(
&self,
command: ApiDeleteUser,
) -> impl Future<Output = Result<Arc<CmdOkResponse>, Self::Error>> + Send
fn api_delete_user( &self, command: ApiDeleteUser, ) -> impl Future<Output = Result<Arc<CmdOkResponse>, Self::Error>> + Send
User profile commands Read more
Source§fn api_update_profile(
&self,
user_id: i64,
profile: Profile,
) -> impl Future<Output = Result<ApiUpdateProfileResponse, Self::Error>> + Send
fn api_update_profile( &self, user_id: i64, profile: Profile, ) -> impl Future<Output = Result<ApiUpdateProfileResponse, Self::Error>> + Send
User profile commands Read more
Source§fn api_set_contact_prefs(
&self,
contact_id: i64,
preferences: Preferences,
) -> impl Future<Output = Result<Arc<ContactPrefsUpdatedResponse>, Self::Error>> + Send
fn api_set_contact_prefs( &self, contact_id: i64, preferences: Preferences, ) -> impl Future<Output = Result<Arc<ContactPrefsUpdatedResponse>, Self::Error>> + Send
User profile commands Read more
Source§fn start_chat(
&self,
command: StartChat,
) -> impl Future<Output = Result<StartChatResponse, Self::Error>> + Send
fn start_chat( &self, command: StartChat, ) -> impl Future<Output = Result<StartChatResponse, Self::Error>> + Send
Chat management Read more
Source§fn api_stop_chat(
&self,
) -> impl Future<Output = Result<Arc<ChatStoppedResponse>, Self::Error>> + Send
fn api_stop_chat( &self, ) -> impl Future<Output = Result<Arc<ChatStoppedResponse>, Self::Error>> + Send
Chat management Read more
Source§impl<C: Clone> Clone for XftpClient<C>
impl<C: Clone> Clone for XftpClient<C>
Source§fn clone(&self) -> XftpClient<C>
fn clone(&self) -> XftpClient<C>
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 moreSource§impl<C: ClientApi> From<C> for XftpClient<C>
impl<C: ClientApi> From<C> for XftpClient<C>
Source§impl<C: ClientApi> Hook for XftpClient<C>
impl<C: ClientApi> Hook for XftpClient<C>
fn should_intercept(&self, kind: EventKind) -> bool
Source§fn intercept_event(&mut self, event: Event)
fn intercept_event(&mut self, event: Event)
Hooks must not block the event stream; this method should be a cheap synchronous call.
Delegate heavy work to another thread or spawn async tasks internally.
Source§impl<C: ClientApi> XftpExt for XftpClient<C>
impl<C: ClientApi> XftpExt for XftpClient<C>
Source§fn download_file<FID: Into<FileId>>(
&self,
file_id: FID,
) -> DownloadFileBuilder<'_, Self>
fn download_file<FID: Into<FileId>>( &self, file_id: FID, ) -> DownloadFileBuilder<'_, Self>
Begin downloading
file_id and return a builder to configure and await the result. Read moreAuto Trait Implementations§
impl<C> Freeze for XftpClient<C>where
C: Freeze,
impl<C> !RefUnwindSafe for XftpClient<C>
impl<C> Send for XftpClient<C>where
C: Send,
impl<C> Sync for XftpClient<C>where
C: Sync,
impl<C> Unpin for XftpClient<C>where
C: Unpin,
impl<C> UnsafeUnpin for XftpClient<C>where
C: UnsafeUnpin,
impl<C> !UnwindSafe for XftpClient<C>
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<C> ClientApiExt for Cwhere
C: ClientApi,
impl<C> ClientApiExt for Cwhere
C: ClientApi,
async fn users(&self) -> Result<Vec<UserInfo>, <C as ClientApi>::Error>
async fn contacts<UID>( &self, user_id: UID, ) -> Result<Vec<Contact>, <C as ClientApi>::Error>
async fn groups<UID>( &self, user_id: UID, ) -> Result<Vec<GroupInfo>, <C as ClientApi>::Error>
Source§async fn new_user(
&self,
user: NewUser,
) -> Result<Arc<ActiveUserResponse>, <C as ClientApi>::Error>
async fn new_user( &self, user: NewUser, ) -> Result<Arc<ActiveUserResponse>, <C as ClientApi>::Error>
Like ClientApi::create_active_user but ensures that user is created even if the name
contains disallowed in SimpleX-Chat UTF-8 characters. The NewUser struct gets cloned when
performing the original request
fn accept_contact<CRID>(
&self,
contact_request_id: CRID,
) -> impl Future<Output = Result<Arc<AcceptingContactRequestResponse>, <C as ClientApi>::Error>>where
CRID: Into<ContactRequestId>,
fn reject_contact<CRID>(
&self,
contact_request_id: CRID,
) -> impl Future<Output = Result<Arc<ContactRequestRejectedResponse>, <C as ClientApi>::Error>>where
CRID: Into<ContactRequestId>,
Source§fn send_message<CID, M>(
&self,
cid: CID,
msg: M,
) -> MessageBuilder<'_, C, <M as MessageLike>::Kind>
fn send_message<CID, M>( &self, cid: CID, msg: M, ) -> MessageBuilder<'_, C, <M as MessageLike>::Kind>
Returns a powerful awaitable MessageBuilder type. Check its docs to learn how to build
any message kind ergonomically
Source§fn multicast_message<I, M>(
&self,
chat_ids: I,
msg: M,
) -> MulticastBuilder<'_, I, C, <M as MessageLike>::Kind>
fn multicast_message<I, M>( &self, chat_ids: I, msg: M, ) -> MulticastBuilder<'_, I, C, <M as MessageLike>::Kind>
Deliver the same message to multiple recepients
fn update_message<CID, MID>( &self, chat_id: CID, message_id: MID, new_content: MsgContent, ) -> impl Future<Output = Result<ApiUpdateChatItemResponse, <C as ClientApi>::Error>>
fn batch_delete_messages<CID, I>( &self, chat_id: CID, message_ids: I, mode: CIDeleteMode, ) -> impl Future<Output = Result<Arc<ChatItemsDeletedResponse>, <C as ClientApi>::Error>>
fn batch_message_reactions<CID, MID, I>( &self, chat_id: CID, message_id: MID, reactions: I, ) -> impl Future<Output = Vec<Result<Arc<ChatItemReactionResponse>, <C as ClientApi>::Error>>>
fn accept_file<FID>(&self, file_id: FID) -> AcceptFileBuilder<'_, C>
fn reject_file<FID>( &self, file_id: FID, ) -> impl Future<Output = Result<CancelFileResponse, <C as ClientApi>::Error>>
fn initiate_connection( &self, link: impl Into<String>, ) -> impl Future<Output = Result<UndocumentedResponse<ConnectResponse>, <C as ClientApi>::Error>>
fn delete_chat<CID>( &self, chat_id: CID, mode: DeleteMode, ) -> impl Future<Output = Result<ApiDeleteChatResponse, <C as ClientApi>::Error>>
fn add_member<GID, CID>( &self, group_id: GID, contact_id: CID, role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<SentGroupInvitationResponse>, <C as ClientApi>::Error>>
fn join_group<GID>( &self, group_id: GID, ) -> impl Future<Output = Result<Arc<UserAcceptedGroupSentResponse>, <C as ClientApi>::Error>>
fn accept_member<GID, MID>( &self, group_id: GID, member_id: MID, role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<MemberAcceptedResponse>, <C as ClientApi>::Error>>
fn set_members_role<GID, I>( &self, group_id: GID, member_ids: I, role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<MembersRoleUserResponse>, <C as ClientApi>::Error>>
fn block_members_for_all<GID, I>( &self, group_id: GID, member_ids: I, ) -> impl Future<Output = Result<Arc<MembersBlockedForAllUserResponse>, <C as ClientApi>::Error>>
fn unblock_members_for_all<GID, I>( &self, group_id: GID, member_ids: I, ) -> impl Future<Output = Result<Arc<MembersBlockedForAllUserResponse>, <C as ClientApi>::Error>>
fn remove_members<GID, I>( &self, group_id: GID, member_ids: I, ) -> impl Future<Output = Result<Arc<UserDeletedMembersResponse>, <C as ClientApi>::Error>>
fn remove_members_with_messages<GID, I>( &self, group_id: GID, member_ids: I, ) -> impl Future<Output = Result<Arc<UserDeletedMembersResponse>, <C as ClientApi>::Error>>
fn leave_group<GID>( &self, group_id: GID, ) -> impl Future<Output = Result<Arc<LeftMemberUserResponse>, <C as ClientApi>::Error>>
async fn list_members<GID>( &self, group_id: GID, ) -> Result<Vec<GroupMember>, <C as ClientApi>::Error>
fn moderate_messages<GID, I>( &self, group_id: GID, message_ids: I, ) -> impl Future<Output = Result<Arc<ChatItemsDeletedResponse>, <C as ClientApi>::Error>>
fn update_group_profile<GID>( &self, group_id: GID, profile: GroupProfile, ) -> impl Future<Output = Result<Arc<GroupUpdatedResponse>, <C as ClientApi>::Error>>
fn set_group_custom_data<GID>( &self, group_id: GID, data: Option<Value>, ) -> impl Future<Output = Result<Arc<CmdOkResponse>, <C as ClientApi>::Error>>
fn set_contact_custom_data<CID>( &self, contact_id: CID, data: Option<Value>, ) -> impl Future<Output = Result<Arc<CmdOkResponse>, <C as ClientApi>::Error>>
fn create_group_link<GID>( &self, group_id: GID, role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<GroupLinkCreatedResponse>, <C as ClientApi>::Error>>
fn set_group_link_role<GID>( &self, group_id: GID, role: GroupMemberRole, ) -> impl Future<Output = Result<Arc<GroupLinkResponse>, <C as ClientApi>::Error>>
fn delete_group_link<GID>( &self, group_id: GID, ) -> impl Future<Output = Result<Arc<GroupLinkDeletedResponse>, <C as ClientApi>::Error>>
fn get_group_link<GID>( &self, group_id: GID, ) -> impl Future<Output = Result<Arc<GroupLinkResponse>, <C as ClientApi>::Error>>
fn get_group_relays<GID>( &self, group_id: GID, ) -> impl Future<Output = Result<Arc<GroupRelaysResponse>, <C as ClientApi>::Error>>
fn add_group_relays<GID, I>( &self, group_id: GID, relay_ids: I, ) -> impl Future<Output = Result<ApiAddGroupRelaysResponse, <C as ClientApi>::Error>>
fn delete_message<CID: Into<ChatId>, MID: Into<MessageId>>( &self, chat_id: CID, message_id: MID, mode: CIDeleteMode, ) -> impl Future<Output = DeleteMessageResponse<Self>>
fn update_message_reaction<CID: Into<ChatId>, MID: Into<MessageId>>( &self, chat_id: CID, message_id: MID, reaction: Reaction, ) -> impl Future<Output = UpdateMessageReactionsResponse<Self>>
fn set_member_role<GID: Into<GroupId>, MID: Into<MemberId>>( &self, group_id: GID, member_id: MID, role: GroupMemberRole, ) -> impl Future<Output = SetMembersRoleResponse<Self>>
fn block_member_for_all<GID: Into<GroupId>, MID: Into<MemberId>>( &self, group_id: GID, member_id: MID, ) -> impl Future<Output = BlockMembersResponse<Self>>
fn unblock_member_for_all<GID: Into<GroupId>, MID: Into<MemberId>>( &self, group_id: GID, member_id: MID, ) -> impl Future<Output = BlockMembersResponse<Self>>
fn remove_member<GID: Into<GroupId>, MID: Into<MemberId>>( &self, group_id: GID, member_id: MID, ) -> impl Future<Output = RemoveMembersResponse<Self>>
fn remove_member_with_messages<GID: Into<GroupId>, MID: Into<MemberId>>( &self, group_id: GID, member_id: MID, ) -> impl Future<Output = RemoveMembersResponse<Self>>
fn moderate_message<GID: Into<GroupId>, MID: Into<MessageId>>( &self, group_id: GID, message_id: MID, ) -> impl Future<Output = DeleteMessageResponse<Self>>
fn add_group_relay<GID: Into<GroupId>, RID: Into<RelayId>>( &self, group_id: GID, relay_id: RID, ) -> impl Future<Output = AddGroupRelaysResponse<Self>>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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