pub trait RpcClient: SubscriptionClientT {
Show 47 methods
// Provided methods
fn add_device(
&self,
account: Option<String>,
uri: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn add_sticker_pack(
&self,
account: Option<String>,
uri: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn block(
&self,
account: Option<String>,
recipients: Vec<String>,
groupIds: Vec<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn delete_local_account_data(
&self,
account: Option<String>,
ignoreRegistered: Option<bool>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn get_attachment(
&self,
account: Option<String>,
id: String,
recipient: Option<String>,
groupId: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn get_avatar(
&self,
account: Option<String>,
contact: Option<String>,
profile: Option<String>,
groupId: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn get_sticker(
&self,
account: Option<String>,
packId: String,
stickerId: u32,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn get_user_status(
&self,
account: Option<String>,
recipients: Vec<String>,
usernames: Vec<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn join_group(
&self,
account: Option<String>,
uri: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn finish_change_number(
&self,
account: Option<String>,
number: String,
verificationCode: String,
pin: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn finish_link(
&self,
deviceLinkUri: String,
deviceName: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn list_accounts(&self) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn list_contacts(
&self,
account: Option<String>,
recipients: Vec<String>,
allRecipients: bool,
blocked: Option<bool>,
name: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn list_devices(
&self,
account: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn list_groups(
&self,
account: Option<String>,
groupIds: Vec<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn list_identities(
&self,
account: Option<String>,
number: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn list_sticker_packs(
&self,
account: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn quit_group(
&self,
account: Option<String>,
groupId: String,
delete: bool,
admins: Vec<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn register(
&self,
account: Option<String>,
voice: bool,
captcha: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn remove_contact(
&self,
account: Option<String>,
recipient: String,
forget: bool,
hide: bool,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn remove_device(
&self,
account: Option<String>,
deviceId: u32,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn remove_pin(
&self,
account: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn remote_delete(
&self,
account: Option<String>,
targetTimestamp: u64,
recipients: Vec<String>,
groupIds: Vec<String>,
noteToSelf: bool,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn send(
&self,
account: Option<String>,
recipients: Vec<String>,
groupIds: Vec<String>,
noteToSelf: bool,
endSession: bool,
message: String,
attachments: Vec<String>,
viewOnce: bool,
mentions: Vec<String>,
textStyle: Vec<String>,
quoteTimestamp: Option<u64>,
quoteAuthor: Option<String>,
quoteMessage: Option<String>,
quoteMention: Vec<String>,
quoteTextStyle: Vec<String>,
quoteAttachment: Vec<String>,
previewUrl: Option<String>,
previewTitle: Option<String>,
previewDescription: Option<String>,
previewImage: Option<String>,
sticker: Option<String>,
storyTimestamp: Option<u64>,
storyAuthor: Option<String>,
editTimestamp: Option<u64>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn send_contacts(
&self,
account: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn send_payment_notification(
&self,
account: Option<String>,
recipient: String,
receipt: String,
note: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn send_reaction(
&self,
account: Option<String>,
recipients: Vec<String>,
groupIds: Vec<String>,
noteToSelf: bool,
emoji: String,
targetAuthor: String,
targetTimestamp: u64,
remove: bool,
story: bool,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn send_receipt(
&self,
account: Option<String>,
recipient: String,
targetTimestamps: Vec<u64>,
type: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn send_sync_request(
&self,
account: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn send_typing(
&self,
account: Option<String>,
recipients: Vec<String>,
groupIds: Vec<String>,
stop: bool,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn send_message_request_response(
&self,
account: Option<String>,
recipients: Vec<String>,
groupIds: Vec<String>,
type: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn set_pin(
&self,
account: Option<String>,
pin: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn submit_rate_limit_challenge(
&self,
account: Option<String>,
challenge: String,
captcha: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn start_change_number(
&self,
account: Option<String>,
number: String,
voice: bool,
captcha: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn start_link(
&self,
account: Option<String>,
) -> impl Future<Output = Result<JsonLink, Error>> + Send { ... }
fn trust(
&self,
account: Option<String>,
recipient: String,
trustAllKnownKeys: bool,
verifiedSafetyNumber: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn unblock(
&self,
account: Option<String>,
recipients: Vec<String>,
groupIds: Vec<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn unregister(
&self,
account: Option<String>,
deleteAccount: bool,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn update_account(
&self,
account: Option<String>,
deviceName: Option<String>,
unrestrictedUnidentifiedSender: Option<bool>,
discoverableByNumber: Option<bool>,
numberSharing: Option<bool>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn update_configuration(
&self,
account: Option<String>,
readReceipts: Option<bool>,
unidentifiedDeliveryIndicators: Option<bool>,
typingIndicators: Option<bool>,
linkPreviews: Option<bool>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn update_contact(
&self,
account: Option<String>,
recipient: String,
name: Option<String>,
expiration: Option<u32>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn update_group(
&self,
account: Option<String>,
groupId: Option<String>,
name: Option<String>,
description: Option<String>,
avatar: Option<String>,
member: Vec<String>,
removeMember: Vec<String>,
admin: Vec<String>,
removeAdmin: Vec<String>,
ban: Vec<String>,
unban: Vec<String>,
resetLink: bool,
link: Option<String>,
setPermissionAddMember: Option<String>,
setPermissionEditDetails: Option<String>,
setPermissionSendMessages: Option<String>,
expiration: Option<u32>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn update_profile(
&self,
account: Option<String>,
givenName: Option<String>,
familyName: Option<String>,
about: Option<String>,
aboutEmoji: Option<String>,
mobileCoinAddress: Option<String>,
avatar: Option<String>,
removeAvatar: bool,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn upload_sticker_pack(
&self,
account: Option<String>,
path: String,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn verify(
&self,
account: Option<String>,
verificationCode: String,
pin: Option<String>,
) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn version(&self) -> impl Future<Output = Result<Value, Error>> + Send { ... }
fn subscribe_receive(
&self,
account: Option<String>,
) -> impl Future<Output = Result<Subscription<RecvMessage>, Error>> + Send { ... }
}Expand description
Client implementation for the Rpc RPC API.
Provided Methods§
fn add_device( &self, account: Option<String>, uri: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn add_sticker_pack( &self, account: Option<String>, uri: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn block( &self, account: Option<String>, recipients: Vec<String>, groupIds: Vec<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn delete_local_account_data( &self, account: Option<String>, ignoreRegistered: Option<bool>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn get_attachment( &self, account: Option<String>, id: String, recipient: Option<String>, groupId: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn get_avatar( &self, account: Option<String>, contact: Option<String>, profile: Option<String>, groupId: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn get_sticker( &self, account: Option<String>, packId: String, stickerId: u32, ) -> impl Future<Output = Result<Value, Error>> + Send
fn get_user_status( &self, account: Option<String>, recipients: Vec<String>, usernames: Vec<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn join_group( &self, account: Option<String>, uri: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn finish_change_number( &self, account: Option<String>, number: String, verificationCode: String, pin: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn finish_link( &self, deviceLinkUri: String, deviceName: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn list_accounts(&self) -> impl Future<Output = Result<Value, Error>> + Send
fn list_contacts( &self, account: Option<String>, recipients: Vec<String>, allRecipients: bool, blocked: Option<bool>, name: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn list_devices( &self, account: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn list_groups( &self, account: Option<String>, groupIds: Vec<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn list_identities( &self, account: Option<String>, number: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn list_sticker_packs( &self, account: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn quit_group( &self, account: Option<String>, groupId: String, delete: bool, admins: Vec<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn register( &self, account: Option<String>, voice: bool, captcha: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn remove_contact( &self, account: Option<String>, recipient: String, forget: bool, hide: bool, ) -> impl Future<Output = Result<Value, Error>> + Send
fn remove_device( &self, account: Option<String>, deviceId: u32, ) -> impl Future<Output = Result<Value, Error>> + Send
fn remove_pin( &self, account: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn remote_delete( &self, account: Option<String>, targetTimestamp: u64, recipients: Vec<String>, groupIds: Vec<String>, noteToSelf: bool, ) -> impl Future<Output = Result<Value, Error>> + Send
fn send( &self, account: Option<String>, recipients: Vec<String>, groupIds: Vec<String>, noteToSelf: bool, endSession: bool, message: String, attachments: Vec<String>, viewOnce: bool, mentions: Vec<String>, textStyle: Vec<String>, quoteTimestamp: Option<u64>, quoteAuthor: Option<String>, quoteMessage: Option<String>, quoteMention: Vec<String>, quoteTextStyle: Vec<String>, quoteAttachment: Vec<String>, previewUrl: Option<String>, previewTitle: Option<String>, previewDescription: Option<String>, previewImage: Option<String>, sticker: Option<String>, storyTimestamp: Option<u64>, storyAuthor: Option<String>, editTimestamp: Option<u64>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn send_contacts( &self, account: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn send_payment_notification( &self, account: Option<String>, recipient: String, receipt: String, note: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn send_reaction( &self, account: Option<String>, recipients: Vec<String>, groupIds: Vec<String>, noteToSelf: bool, emoji: String, targetAuthor: String, targetTimestamp: u64, remove: bool, story: bool, ) -> impl Future<Output = Result<Value, Error>> + Send
fn send_receipt( &self, account: Option<String>, recipient: String, targetTimestamps: Vec<u64>, type: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn send_sync_request( &self, account: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn send_typing( &self, account: Option<String>, recipients: Vec<String>, groupIds: Vec<String>, stop: bool, ) -> impl Future<Output = Result<Value, Error>> + Send
fn send_message_request_response( &self, account: Option<String>, recipients: Vec<String>, groupIds: Vec<String>, type: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn set_pin( &self, account: Option<String>, pin: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn submit_rate_limit_challenge( &self, account: Option<String>, challenge: String, captcha: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn start_change_number( &self, account: Option<String>, number: String, voice: bool, captcha: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn start_link( &self, account: Option<String>, ) -> impl Future<Output = Result<JsonLink, Error>> + Send
fn trust( &self, account: Option<String>, recipient: String, trustAllKnownKeys: bool, verifiedSafetyNumber: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn unblock( &self, account: Option<String>, recipients: Vec<String>, groupIds: Vec<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn unregister( &self, account: Option<String>, deleteAccount: bool, ) -> impl Future<Output = Result<Value, Error>> + Send
fn update_account( &self, account: Option<String>, deviceName: Option<String>, unrestrictedUnidentifiedSender: Option<bool>, discoverableByNumber: Option<bool>, numberSharing: Option<bool>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn update_configuration( &self, account: Option<String>, readReceipts: Option<bool>, unidentifiedDeliveryIndicators: Option<bool>, typingIndicators: Option<bool>, linkPreviews: Option<bool>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn update_contact( &self, account: Option<String>, recipient: String, name: Option<String>, expiration: Option<u32>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn update_group( &self, account: Option<String>, groupId: Option<String>, name: Option<String>, description: Option<String>, avatar: Option<String>, member: Vec<String>, removeMember: Vec<String>, admin: Vec<String>, removeAdmin: Vec<String>, ban: Vec<String>, unban: Vec<String>, resetLink: bool, link: Option<String>, setPermissionAddMember: Option<String>, setPermissionEditDetails: Option<String>, setPermissionSendMessages: Option<String>, expiration: Option<u32>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn update_profile( &self, account: Option<String>, givenName: Option<String>, familyName: Option<String>, about: Option<String>, aboutEmoji: Option<String>, mobileCoinAddress: Option<String>, avatar: Option<String>, removeAvatar: bool, ) -> impl Future<Output = Result<Value, Error>> + Send
fn upload_sticker_pack( &self, account: Option<String>, path: String, ) -> impl Future<Output = Result<Value, Error>> + Send
fn verify( &self, account: Option<String>, verificationCode: String, pin: Option<String>, ) -> impl Future<Output = Result<Value, Error>> + Send
fn version(&self) -> impl Future<Output = Result<Value, Error>> + Send
fn subscribe_receive( &self, account: Option<String>, ) -> impl Future<Output = Result<Subscription<RecvMessage>, Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.