pub struct AccountRequest<'a> { /* private fields */ }Expand description
A single logical operation borrowing this client’s temporary request state. It is not an account owner and cannot outlive request_blocking. No operation accepts an independently mutable AccountState. Use ordinary async client methods unless the embedding application already owns a blocking worker.
Implementations§
Source§impl AccountRequest<'_>
impl AccountRequest<'_>
Sourcepub fn account(&self) -> &AccountState
pub fn account(&self) -> &AccountState
Read-only request context for protocol preparation and journal binding. These secret bytes are not an independent account owner or a handoff.
pub fn sync(&mut self, cursor: &[u8]) -> Result<SyncBatch>
pub fn sync_scene(&mut self, cursor: &[u8], scene: u32) -> Result<SyncBatch>
pub fn heartbeat(&mut self, cursor: &[u8]) -> Result<Heartbeat>
pub fn lookup_contacts(&mut self, ids: &[String]) -> Result<ContactLookup>
pub fn lookup_room(&mut self, room: &str, version: u32) -> Result<RoomRoster>
pub fn init_contacts( &mut self, contact_sequence: u32, room_sequence: u32, ) -> Result<InitContactPage>
pub fn download_avatars(&mut self, ids: &[String]) -> Result<Vec<AvatarBytes>>
pub fn download_voice_chunk( &mut self, server_id: u64, length: u32, offset: u32, ) -> Result<VoiceChunk>
pub fn cdn_config(&mut self) -> Result<CdnConfig>
pub fn large_cdn_config(&mut self, route: LargeCdnRoute) -> Result<CdnConfig>
pub fn group_inventory(&mut self, cursor: &[u8]) -> Result<GroupMetadataPage>
pub fn lookup_contacts_raw(&mut self, ids: &[String]) -> Result<Vec<u8>>
pub fn lookup_contacts_receipt( &mut self, ids: &[String], ) -> Result<MetadataReply<ContactLookup>>
pub fn lookup_room_raw(&mut self, room: &str, version: u32) -> Result<Vec<u8>>
pub fn lookup_room_receipt( &mut self, room: &str, version: u32, ) -> Result<MetadataReply<RoomRoster>>
pub fn init_contacts_receipt( &mut self, contacts: u32, rooms: u32, ) -> Result<MetadataReply<InitContactPage>>
pub fn group_detail_raw(&mut self, group: &str) -> Result<Vec<u8>>
pub fn group_mutation_raw(&mut self, request: &GroupRpc) -> Result<Vec<u8>>
pub fn recall_message( &mut self, request: &MessageRecall, ) -> Result<MessageRecallReply>
pub fn notify_read_session( &mut self, request: &SessionReadNotification, ) -> Result<SessionReadReply>
pub fn contact_sync( &mut self, cursor: &[u8], message_cursor: &[u8], continuation: bool, ) -> Result<ContactSyncBatch>
pub fn send_quote( &mut self, destination: &str, client_id: &str, created_at: u32, content: &str, source: Option<&str>, ) -> Result<MediaSendResult>
pub fn reserve_file_upload( &mut self, destination: &str, client_id: &str, name: &str, length: usize, md5: &str, ) -> Result<FileUploadReservation>
pub fn send_file( &mut self, destination: &str, client_id: &str, created_at: u32, upload: &UploadedMedia, reservation: Option<&FileUploadReservation>, ) -> Result<MediaSendResult>
pub fn send_image( &mut self, destination: &str, client_id: &str, upload: &UploadedImage, ) -> Result<MediaSendResult>
pub fn send_video( &mut self, destination: &str, client_id: &str, upload: &UploadedVideo, seconds: u32, ) -> Result<MediaSendResult>
pub fn send_voice( &mut self, destination: &str, client_id: &str, created_at: u32, duration_ms: u32, encoded: &[u8], ) -> Result<MediaSendResult>
pub fn send_text( &mut self, destination: &str, content: &str, options: &TextSendOptions, ) -> Result<TextSendResult>
pub fn send_text_guarded( &mut self, destination: &str, content: &str, options: &TextSendOptions, before_submit: impl FnOnce() -> Result<()>, ) -> Result<TextSendResult>
pub fn call_rpc( &mut self, route: CallHostRoute, request: &[u8], before_submit: impl FnOnce() -> Result<()>, retain_reply: impl FnOnce(&[u8]) -> Result<()>, ) -> Result<Vec<u8>>
Sourcepub fn call_live_sync(
&mut self,
request: &[u8],
wait_timeout: Duration,
before_submit: impl FnOnce() -> Result<()>,
wait: impl for<'a> FnOnce(Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'a>>) -> Result<Vec<u8>>,
retain_reply: impl FnOnce(&[u8]) -> Result<()>,
) -> Result<Vec<u8>>
pub fn call_live_sync( &mut self, request: &[u8], wait_timeout: Duration, before_submit: impl FnOnce() -> Result<()>, wait: impl for<'a> FnOnce(Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'a>>) -> Result<Vec<u8>>, retain_reply: impl FnOnce(&[u8]) -> Result<()>, ) -> Result<Vec<u8>>
Read-only call polling on an existing blocking worker. The caller owns the async wait/cancellation mechanism; this context retains the account lease until that transport future is dropped or completes.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AccountRequest<'a>
impl<'a> !UnwindSafe for AccountRequest<'a>
impl<'a> Forget for AccountRequest<'a>
impl<'a> Freeze for AccountRequest<'a>
impl<'a> Send for AccountRequest<'a>
impl<'a> Sync for AccountRequest<'a>
impl<'a> Unpin for AccountRequest<'a>
impl<'a> UnsafeUnpin for AccountRequest<'a>
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