Trait libsignal_service::push_service::PushService

source ·
pub trait PushService: MaybeSend {
    type ByteStream: AsyncRead + MaybeSend + Unpin;

Show 40 methods // Required methods fn get_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, ) -> Pin<Box<dyn Future<Output = Result<T, ServiceError>> + 'async_trait>> where for<'de> T: Deserialize<'de> + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn delete_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], ) -> Pin<Box<dyn Future<Output = Result<T, ServiceError>> + 'async_trait>> where for<'de> T: Deserialize<'de> + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn put_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, D, S>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, value: S, ) -> Pin<Box<dyn Future<Output = Result<D, ServiceError>> + 'async_trait>> where for<'de> D: Deserialize<'de> + 'async_trait, S: MaybeSend + Serialize + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn patch_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, D, S>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, value: S, ) -> Pin<Box<dyn Future<Output = Result<D, ServiceError>> + 'async_trait>> where for<'de> D: Deserialize<'de> + 'async_trait, S: MaybeSend + Serialize + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn post_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, D, S>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, value: S, ) -> Pin<Box<dyn Future<Output = Result<D, ServiceError>> + 'async_trait>> where for<'de> D: Deserialize<'de> + 'async_trait, S: MaybeSend + Serialize + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn get_protobuf<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, ) -> Pin<Box<dyn Future<Output = Result<T, ServiceError>> + 'async_trait>> where T: Default + ProtobufMessage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn put_protobuf<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, D, S>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], value: S, ) -> Pin<Box<dyn Future<Output = Result<D, ServiceError>> + 'async_trait>> where D: Default + ProtobufMessage + 'async_trait, S: Sized + ProtobufMessage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait; fn get_from_cdn<'life0, 'life1, 'async_trait>( &'life0 mut self, cdn_id: u32, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn post_to_cdn0<'s, 'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, C>( &'life0 mut self, path: &'life1 str, value: &'life2 [(&'life3 str, &'life4 str)], file: Option<(&'life5 str, &'s mut C)>, ) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + 'async_trait>> where C: Read + Send + 's + 'async_trait, Self: 'async_trait, 's: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait; fn ws<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 mut self, path: &'life1 str, keepalive_path: &'life2 str, additional_headers: &'life3 [(&'life4 str, &'life5 str)], credentials: Option<ServiceCredentials>, ) -> Pin<Box<dyn Future<Output = Result<SignalWebSocket, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait; // Provided methods fn devices<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<DeviceInfo>, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn unlink_device<'life0, 'async_trait>( &'life0 mut self, id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_pre_key_status<'life0, 'async_trait>( &'life0 mut self, service_id_type: ServiceIdType, ) -> Pin<Box<dyn Future<Output = Result<PreKeyStatus, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn register_pre_keys<'life0, 'async_trait>( &'life0 mut self, service_id_type: ServiceIdType, pre_key_state: PreKeyState, ) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_attachment_by_id<'life0, 'life1, 'async_trait>( &'life0 mut self, id: &'life1 str, cdn_id: u32, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_attachment<'life0, 'life1, 'async_trait>( &'life0 mut self, ptr: &'life1 AttachmentPointer, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_sticker_pack_manifest<'life0, 'life1, 'async_trait>( &'life0 mut self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_sticker<'life0, 'life1, 'async_trait>( &'life0 mut self, pack_id: &'life1 str, sticker_id: u32, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn send_messages<'life0, 'async_trait>( &'life0 mut self, messages: OutgoingPushMessages, ) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_attachment_v2_upload_attributes<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<AttachmentV2UploadAttributes, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn upload_attachment<'s, 'life0, 'life1, 'async_trait, C>( &'life0 mut self, attrs: &'life1 AttachmentV2UploadAttributes, content: &'s mut C, ) -> Pin<Box<dyn Future<Output = Result<(u64, Vec<u8>), ServiceError>> + 'async_trait>> where C: Read + Send + 's + 'async_trait, Self: 'async_trait, 's: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_messages<'life0, 'async_trait>( &'life0 mut self, allow_stories: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<EnvelopeEntity>, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn whoami<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<WhoAmIResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn retrieve_profile_by_id<'life0, 'async_trait>( &'life0 mut self, address: ServiceAddress, profile_key: Option<ProfileKey>, ) -> Pin<Box<dyn Future<Output = Result<SignalServiceProfile, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn retrieve_profile_avatar<'life0, 'life1, 'async_trait>( &'life0 mut self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn retrieve_groups_v2_profile_avatar<'life0, 'life1, 'async_trait>( &'life0 mut self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_pre_key<'life0, 'life1, 'async_trait>( &'life0 mut self, destination: &'life1 ServiceAddress, device_id: u32, ) -> Pin<Box<dyn Future<Output = Result<PreKeyBundle, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_pre_keys<'life0, 'life1, 'async_trait>( &'life0 mut self, destination: &'life1 ServiceAddress, device_id: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<PreKeyBundle>, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_group<'life0, 'async_trait>( &'life0 mut self, credentials: HttpAuth, ) -> Pin<Box<dyn Future<Output = Result<Group, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_sender_certificate<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<SenderCertificate, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_uuid_only_sender_certificate<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<SenderCertificate, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn link_device<'life0, 'life1, 'async_trait>( &'life0 mut self, link_request: &'life1 LinkRequest, http_auth: HttpAuth, ) -> Pin<Box<dyn Future<Output = Result<LinkResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn set_account_attributes<'life0, 'async_trait>( &'life0 mut self, attributes: AccountAttributes, ) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn write_profile<'s, 'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait, C, S>( &'life0 mut self, version: &'life1 ProfileKeyVersion, name: &'life2 [u8], about: &'life3 [u8], emoji: &'life4 [u8], commitment: &'life5 ProfileKeyCommitment, avatar: AvatarWrite<&'life6 mut C>, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, ServiceError>> + 'async_trait>> where C: Read + Send + 's + 'async_trait, S: AsRef<str> + 'async_trait, Self: 'async_trait, 's: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait { ... } fn create_verification_session<'a, 'life0, 'async_trait>( &'life0 mut self, number: &'a str, push_token: Option<&'a str>, mcc: Option<&'a str>, mnc: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<RegistrationSessionMetadataResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait { ... } fn patch_verification_session<'a, 'life0, 'async_trait>( &'life0 mut self, session_id: &'a str, push_token: Option<&'a str>, mcc: Option<&'a str>, mnc: Option<&'a str>, captcha: Option<&'a str>, push_challenge: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<RegistrationSessionMetadataResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait { ... } fn request_verification_code<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, session_id: &'life1 str, client: &'life2 str, transport: VerificationTransport, ) -> Pin<Box<dyn Future<Output = Result<RegistrationSessionMetadataResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn submit_verification_code<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, session_id: &'life1 str, verification_code: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RegistrationSessionMetadataResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn submit_registration_request<'a, 'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, registration_method: RegistrationMethod<'a>, account_attributes: AccountAttributes, skip_device_transfer: bool, aci_identity_key: &'life1 IdentityKey, pni_identity_key: &'life2 IdentityKey, device_activation_request: DeviceActivationRequest, ) -> Pin<Box<dyn Future<Output = Result<VerifyAccountResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn distribute_pni_keys<'life0, 'life1, 'async_trait>( &'life0 mut self, pni_identity_key: &'life1 IdentityKey, device_messages: Vec<OutgoingPushMessage>, device_pni_signed_prekeys: HashMap<String, SignedPreKeyEntity>, device_pni_last_resort_kyber_prekeys: HashMap<String, KyberPreKeyEntity>, pni_registration_ids: HashMap<String, u32>, signature_valid_on_each_signed_pre_key: bool, ) -> Pin<Box<dyn Future<Output = Result<VerifyAccountResponse, ServiceError>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}

Required Associated Types§

source

type ByteStream: AsyncRead + MaybeSend + Unpin

Required Methods§

source

fn get_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, ) -> Pin<Box<dyn Future<Output = Result<T, ServiceError>> + 'async_trait>>
where for<'de> T: Deserialize<'de> + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

source

fn delete_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], ) -> Pin<Box<dyn Future<Output = Result<T, ServiceError>> + 'async_trait>>
where for<'de> T: Deserialize<'de> + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

source

fn put_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, D, S>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, value: S, ) -> Pin<Box<dyn Future<Output = Result<D, ServiceError>> + 'async_trait>>
where for<'de> D: Deserialize<'de> + 'async_trait, S: MaybeSend + Serialize + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

source

fn patch_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, D, S>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, value: S, ) -> Pin<Box<dyn Future<Output = Result<D, ServiceError>> + 'async_trait>>
where for<'de> D: Deserialize<'de> + 'async_trait, S: MaybeSend + Serialize + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

source

fn post_json<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, D, S>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, value: S, ) -> Pin<Box<dyn Future<Output = Result<D, ServiceError>> + 'async_trait>>
where for<'de> D: Deserialize<'de> + 'async_trait, S: MaybeSend + Serialize + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

source

fn get_protobuf<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, T>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], credentials_override: HttpAuthOverride, ) -> Pin<Box<dyn Future<Output = Result<T, ServiceError>> + 'async_trait>>
where T: Default + ProtobufMessage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

source

fn put_protobuf<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait, D, S>( &'life0 mut self, service: Endpoint, path: &'life1 str, additional_headers: &'life2 [(&'life3 str, &'life4 str)], value: S, ) -> Pin<Box<dyn Future<Output = Result<D, ServiceError>> + 'async_trait>>
where D: Default + ProtobufMessage + 'async_trait, S: Sized + ProtobufMessage + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

source

fn get_from_cdn<'life0, 'life1, 'async_trait>( &'life0 mut self, cdn_id: u32, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Downloads larger files in streaming fashion, e.g. attachments.

source

fn post_to_cdn0<'s, 'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait, C>( &'life0 mut self, path: &'life1 str, value: &'life2 [(&'life3 str, &'life4 str)], file: Option<(&'life5 str, &'s mut C)>, ) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + 'async_trait>>
where C: Read + Send + 's + 'async_trait, Self: 'async_trait, 's: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Upload larger file to CDN0 in legacy fashion, e.g. for attachments.

Implementations are allowed to panic when the Read instance throws an IO-Error

source

fn ws<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 mut self, path: &'life1 str, keepalive_path: &'life2 str, additional_headers: &'life3 [(&'life4 str, &'life5 str)], credentials: Option<ServiceCredentials>, ) -> Pin<Box<dyn Future<Output = Result<SignalWebSocket, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Provided Methods§

source

fn devices<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<DeviceInfo>, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetches a list of all devices tied to the authenticated account.

This list include the device that sends the request.

source

fn get_pre_key_status<'life0, 'async_trait>( &'life0 mut self, service_id_type: ServiceIdType, ) -> Pin<Box<dyn Future<Output = Result<PreKeyStatus, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn register_pre_keys<'life0, 'async_trait>( &'life0 mut self, service_id_type: ServiceIdType, pre_key_state: PreKeyState, ) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_attachment_by_id<'life0, 'life1, 'async_trait>( &'life0 mut self, id: &'life1 str, cdn_id: u32, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_attachment<'life0, 'life1, 'async_trait>( &'life0 mut self, ptr: &'life1 AttachmentPointer, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_sticker_pack_manifest<'life0, 'life1, 'async_trait>( &'life0 mut self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_sticker<'life0, 'life1, 'async_trait>( &'life0 mut self, pack_id: &'life1 str, sticker_id: u32, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn send_messages<'life0, 'async_trait>( &'life0 mut self, messages: OutgoingPushMessages, ) -> Pin<Box<dyn Future<Output = Result<SendMessageResponse, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_attachment_v2_upload_attributes<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<AttachmentV2UploadAttributes, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Request AttachmentV2UploadAttributes

Equivalent with getAttachmentV2UploadAttributes

source

fn upload_attachment<'s, 'life0, 'life1, 'async_trait, C>( &'life0 mut self, attrs: &'life1 AttachmentV2UploadAttributes, content: &'s mut C, ) -> Pin<Box<dyn Future<Output = Result<(u64, Vec<u8>), ServiceError>> + 'async_trait>>
where C: Read + Send + 's + 'async_trait, Self: 'async_trait, 's: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Upload attachment to CDN

Returns attachment ID and the attachment digest

source

fn get_messages<'life0, 'async_trait>( &'life0 mut self, allow_stories: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<EnvelopeEntity>, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn whoami<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<WhoAmIResponse, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Method used to check our own UUID

source

fn retrieve_profile_by_id<'life0, 'async_trait>( &'life0 mut self, address: ServiceAddress, profile_key: Option<ProfileKey>, ) -> Pin<Box<dyn Future<Output = Result<SignalServiceProfile, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn retrieve_profile_avatar<'life0, 'life1, 'async_trait>( &'life0 mut self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn retrieve_groups_v2_profile_avatar<'life0, 'life1, 'async_trait>( &'life0 mut self, path: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Self::ByteStream, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_pre_key<'life0, 'life1, 'async_trait>( &'life0 mut self, destination: &'life1 ServiceAddress, device_id: u32, ) -> Pin<Box<dyn Future<Output = Result<PreKeyBundle, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_pre_keys<'life0, 'life1, 'async_trait>( &'life0 mut self, destination: &'life1 ServiceAddress, device_id: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<PreKeyBundle>, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn get_group<'life0, 'async_trait>( &'life0 mut self, credentials: HttpAuth, ) -> Pin<Box<dyn Future<Output = Result<Group, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_sender_certificate<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<SenderCertificate, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_uuid_only_sender_certificate<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<SenderCertificate, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn set_account_attributes<'life0, 'async_trait>( &'life0 mut self, attributes: AccountAttributes, ) -> Pin<Box<dyn Future<Output = Result<(), ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn write_profile<'s, 'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait, C, S>( &'life0 mut self, version: &'life1 ProfileKeyVersion, name: &'life2 [u8], about: &'life3 [u8], emoji: &'life4 [u8], commitment: &'life5 ProfileKeyCommitment, avatar: AvatarWrite<&'life6 mut C>, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, ServiceError>> + 'async_trait>>
where C: Read + Send + 's + 'async_trait, S: AsRef<str> + 'async_trait, Self: 'async_trait, 's: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

Writes a profile and returns the avatar URL, if one was provided.

The name, about and emoji fields are encrypted with an ProfileCipher. See AccountManager for a convenience method.

Java equivalent: writeProfile

source

fn create_verification_session<'a, 'life0, 'async_trait>( &'life0 mut self, number: &'a str, push_token: Option<&'a str>, mcc: Option<&'a str>, mnc: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<RegistrationSessionMetadataResponse, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

source

fn patch_verification_session<'a, 'life0, 'async_trait>( &'life0 mut self, session_id: &'a str, push_token: Option<&'a str>, mcc: Option<&'a str>, mnc: Option<&'a str>, captcha: Option<&'a str>, push_challenge: Option<&'a str>, ) -> Pin<Box<dyn Future<Output = Result<RegistrationSessionMetadataResponse, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

source

fn request_verification_code<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, session_id: &'life1 str, client: &'life2 str, transport: VerificationTransport, ) -> Pin<Box<dyn Future<Output = Result<RegistrationSessionMetadataResponse, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Request a verification code.

Signal requires a client type, and they use these three strings internally:

  • “android-2021-03”
  • “android”
  • “ios” “android-2021-03” allegedly implies FCM support, whereas the other strings don’t. In principle, they will consider any string as “unknown”, so other strings may work too.
source

fn submit_verification_code<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, session_id: &'life1 str, verification_code: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RegistrationSessionMetadataResponse, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn submit_registration_request<'a, 'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, registration_method: RegistrationMethod<'a>, account_attributes: AccountAttributes, skip_device_transfer: bool, aci_identity_key: &'life1 IdentityKey, pni_identity_key: &'life2 IdentityKey, device_activation_request: DeviceActivationRequest, ) -> Pin<Box<dyn Future<Output = Result<VerifyAccountResponse, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

source

fn distribute_pni_keys<'life0, 'life1, 'async_trait>( &'life0 mut self, pni_identity_key: &'life1 IdentityKey, device_messages: Vec<OutgoingPushMessage>, device_pni_signed_prekeys: HashMap<String, SignedPreKeyEntity>, device_pni_last_resort_kyber_prekeys: HashMap<String, KyberPreKeyEntity>, pni_registration_ids: HashMap<String, u32>, signature_valid_on_each_signed_pre_key: bool, ) -> Pin<Box<dyn Future<Output = Result<VerifyAccountResponse, ServiceError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§