Skip to main content

AccountRequest

Struct AccountRequest 

Source
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<'_>

Source

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.

Source

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.

Source

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.

Source

pub fn sync(&mut self, cursor: &[u8]) -> Result<SyncBatch>

Source

pub fn sync_scene(&mut self, cursor: &[u8], scene: u32) -> Result<SyncBatch>

Source

pub fn heartbeat(&mut self, cursor: &[u8]) -> Result<Heartbeat>

Source

pub fn lookup_contacts(&mut self, ids: &[String]) -> Result<ContactLookup>

Source

pub fn lookup_room(&mut self, room: &str, version: u32) -> Result<RoomRoster>

Source

pub fn init_contacts( &mut self, contact_sequence: u32, room_sequence: u32, ) -> Result<InitContactPage>

Source

pub fn download_avatars(&mut self, ids: &[String]) -> Result<Vec<AvatarBytes>>

Source

pub fn download_voice_chunk( &mut self, server_id: u64, length: u32, offset: u32, ) -> Result<VoiceChunk>

Source

pub fn cdn_config(&mut self) -> Result<CdnConfig>

Source

pub fn large_cdn_config(&mut self, route: LargeCdnRoute) -> Result<CdnConfig>

Source

pub fn group_inventory(&mut self, cursor: &[u8]) -> Result<GroupMetadataPage>

Source

pub fn lookup_contacts_raw(&mut self, ids: &[String]) -> Result<Vec<u8>>

Source

pub fn lookup_contacts_receipt( &mut self, ids: &[String], ) -> Result<MetadataReply<ContactLookup>>

Source

pub fn lookup_room_raw(&mut self, room: &str, version: u32) -> Result<Vec<u8>>

Source

pub fn lookup_room_receipt( &mut self, room: &str, version: u32, ) -> Result<MetadataReply<RoomRoster>>

Source

pub fn init_contacts_receipt( &mut self, contacts: u32, rooms: u32, ) -> Result<MetadataReply<InitContactPage>>

Source

pub fn group_detail_raw(&mut self, group: &str) -> Result<Vec<u8>>

Source

pub fn group_mutation_raw(&mut self, request: &GroupRpc) -> Result<Vec<u8>>

Source

pub fn recall_message( &mut self, request: &MessageRecall, ) -> Result<MessageRecallReply>

Source

pub fn notify_read_session( &mut self, request: &SessionReadNotification, ) -> Result<SessionReadReply>

Source

pub fn contact_sync( &mut self, cursor: &[u8], message_cursor: &[u8], continuation: bool, ) -> Result<ContactSyncBatch>

Source

pub fn send_share( &mut self, destination: &str, client_id: &str, created_at: u32, content: &str, ) -> Result<MediaSendResult>

Source

pub fn send_quote( &mut self, destination: &str, client_id: &str, created_at: u32, content: &str, source: Option<&str>, ) -> Result<MediaSendResult>

Source

pub fn reserve_file_upload( &mut self, destination: &str, client_id: &str, name: &str, length: usize, md5: &str, ) -> Result<FileUploadReservation>

Source

pub fn send_file( &mut self, destination: &str, client_id: &str, created_at: u32, upload: &UploadedMedia, reservation: Option<&FileUploadReservation>, ) -> Result<MediaSendResult>

Source

pub fn send_image( &mut self, destination: &str, client_id: &str, upload: &UploadedImage, ) -> Result<MediaSendResult>

Source

pub fn send_video( &mut self, destination: &str, client_id: &str, upload: &UploadedVideo, seconds: u32, ) -> Result<MediaSendResult>

Source

pub fn send_voice( &mut self, destination: &str, client_id: &str, created_at: u32, duration_ms: u32, encoded: &[u8], ) -> Result<MediaSendResult>

Source

pub fn send_text( &mut self, destination: &str, content: &str, options: &TextSendOptions, ) -> Result<TextSendResult>

Source

pub fn send_text_guarded( &mut self, destination: &str, content: &str, options: &TextSendOptions, before_submit: impl FnOnce() -> Result<()>, ) -> Result<TextSendResult>

Source

pub fn call_rpc( &mut self, route: CallHostRoute, request: &[u8], before_submit: impl FnOnce() -> Result<()>, retain_reply: impl FnOnce(&[u8]) -> Result<()>, ) -> Result<Vec<u8>>

Source

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> Move 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more