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 upload_sticker_chunk(
&mut self,
source: &[u8],
offset: u32,
) -> Result<StickerUploadAcknowledgement>
pub fn upload_sticker_chunk( &mut self, source: &[u8], offset: u32, ) -> Result<StickerUploadAcknowledgement>
Submit one direct sticker upload chunk. Journal the attempt before calling; an error after submission has an uncertain outcome and is not a retry grant.
Sourcepub fn custom_stickers_raw(&mut self, request: &[u8]) -> Result<Vec<u8>>
pub fn custom_stickers_raw(&mut self, request: &[u8]) -> Result<Vec<u8>>
Return one custom-list or metadata reply for caller-owned receipt retention. The request must come from the bounded custom-sticker builders.
Sourcepub fn mutate_custom_sticker(
&mut self,
id: &str,
action: &CustomStickerMutation,
) -> Result<Vec<u8>>
pub fn mutate_custom_sticker( &mut self, id: &str, action: &CustomStickerMutation, ) -> Result<Vec<u8>>
Submit one journaled Saved membership/placement intent, returning even a rejected service reply before decoding. A transport error is uncertain.
Sourcepub fn upload_sticker_chunk_raw(
&mut self,
source: &[u8],
offset: u32,
) -> Result<Vec<u8>>
pub fn upload_sticker_chunk_raw( &mut self, source: &[u8], offset: u32, ) -> Result<Vec<u8>>
Submit one direct upload chunk and return its raw acknowledgement for retention before validation. Callers must journal each attempted offset.
Sourcepub fn sticker_pack_page_raw(
&mut self,
feed: StickerPackFeed,
cursor: &[u8],
) -> Result<Vec<u8>>
pub fn sticker_pack_page_raw( &mut self, feed: StickerPackFeed, cursor: &[u8], ) -> Result<Vec<u8>>
Read a native pack-list page for durable caller-owned receipt storage.
Sourcepub fn sticker_pack_detail_raw(&mut self, id: &str) -> Result<Vec<u8>>
pub fn sticker_pack_detail_raw(&mut self, id: &str) -> Result<Vec<u8>>
Read full metadata/content references for one product without acquiring media.
Sourcepub fn sticker_pack_captions_raw(&mut self, id: &str) -> Result<Vec<u8>>
pub fn sticker_pack_captions_raw(&mut self, id: &str) -> Result<Vec<u8>>
Read localized caption rows for one product, retaining the complete reply.
Sourcepub fn sticker_pack_membership_raw(
&mut self,
id: &str,
added: bool,
) -> Result<Vec<u8>>
pub fn sticker_pack_membership_raw( &mut self, id: &str, added: bool, ) -> Result<Vec<u8>>
Submit one journaled eligible-free membership change. The caller checks eligibility before adding, retains this reply and reconciles membership. A transport error is uncertain and never an automatic retry grant.
Sourcepub fn sticker_pack_acquisition_raw(&mut self, id: &str) -> Result<Vec<u8>>
pub fn sticker_pack_acquisition_raw(&mut self, id: &str) -> Result<Vec<u8>>
Acquire one archive locator without changing pack membership. Journal the attempt before calling and retain the raw reply before decoding it.
Sourcepub fn send_sticker_chunk_raw(
&mut self,
chunk: &StickerSendChunk<'_>,
) -> Result<Vec<u8>>
pub fn send_sticker_chunk_raw( &mut self, chunk: &StickerSendChunk<'_>, ) -> Result<Vec<u8>>
Submit one journaled probe or byte continuation for a single sticker send. Return raw bytes for durable retention before validating acknowledgement.
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.
Sourcepub fn lookup_openim_contact(
&mut self,
username: &str,
room: Option<&str>,
ticket: Option<&str>,
) -> Result<OpenImContact>
pub fn lookup_openim_contact( &mut self, username: &str, room: Option<&str>, ticket: Option<&str>, ) -> Result<OpenImContact>
Read one exact OpenIM contact using optional group context and a supplied ticket.
Sourcepub fn lookup_openim_contact_raw(
&mut self,
username: &str,
room: Option<&str>,
ticket: Option<&str>,
) -> Result<Vec<u8>>
pub fn lookup_openim_contact_raw( &mut self, username: &str, room: Option<&str>, ticket: Option<&str>, ) -> Result<Vec<u8>>
Return the authenticated OpenIM reply bytes for caller-owned receipt storage and decoding.
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>
Sourcepub fn channels_ticket(&mut self) -> Result<ChannelsTicket>
pub fn channels_ticket(&mut self) -> Result<ChannelsTicket>
Request a new H5 ticket for Channels post lookups. Submitted once, without renewal or retry.
Sourcepub fn channels_page(&mut self, post: &ChannelsPost) -> Result<ChannelsPage>
pub fn channels_page(&mut self, post: &ChannelsPost) -> Result<ChannelsPage>
Request the authenticated page address for a Channels post. Submitted once.
Sourcepub fn channels_media(
&mut self,
post: &ChannelsPost,
ticket: &ChannelsTicket,
page: &ChannelsPage,
) -> Result<ChannelsMedia>
pub fn channels_media( &mut self, post: &ChannelsPost, ticket: &ChannelsTicket, page: &ChannelsPage, ) -> Result<ChannelsMedia>
Request a Channels post’s detail and return its single video’s fresh playback material. Submitted once.
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>
Sourcepub fn send_image(
&mut self,
destination: &str,
client_id: &str,
upload: &UploadedImage,
) -> Result<MediaSendResult>
pub fn send_image( &mut self, destination: &str, client_id: &str, upload: &UploadedImage, ) -> Result<MediaSendResult>
Submit the uploaded standard and thumbnail copies, including an original when present.
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.