Struct AccountsClient
pub struct AccountsClient<T> { /* private fields */ }Expand description
Provides methods for working with Signal accounts.
Implementations§
§impl<T> AccountsClient<T>
impl<T> AccountsClient<T>
pub fn new(inner: T) -> AccountsClient<T>
pub fn with_origin(inner: T, origin: Uri) -> AccountsClient<T>
pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> AccountsClient<InterceptedService<T, F>>
pub fn send_compressed(self, encoding: CompressionEncoding) -> AccountsClient<T>
pub fn send_compressed(self, encoding: CompressionEncoding) -> AccountsClient<T>
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
pub fn accept_compressed(
self,
encoding: CompressionEncoding,
) -> AccountsClient<T>
pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> AccountsClient<T>
Enable decompressing responses.
pub fn max_decoding_message_size(self, limit: usize) -> AccountsClient<T>
pub fn max_decoding_message_size(self, limit: usize) -> AccountsClient<T>
Limits the maximum size of a decoded message.
Default: 4MB
pub fn max_encoding_message_size(self, limit: usize) -> AccountsClient<T>
pub fn max_encoding_message_size(self, limit: usize) -> AccountsClient<T>
Limits the maximum size of an encoded message.
Default: usize::MAX
pub async fn get_account_identity(
&mut self,
request: impl IntoRequest<GetAccountIdentityRequest>,
) -> Result<Response<GetAccountIdentityResponse>, Status>
pub async fn get_account_identity( &mut self, request: impl IntoRequest<GetAccountIdentityRequest>, ) -> Result<Response<GetAccountIdentityResponse>, Status>
Returns basic identifiers for the authenticated account.
pub async fn get_entitlements(
&mut self,
request: impl IntoRequest<GetEntitlementsRequest>,
) -> Result<Response<GetEntitlementsResponse>, Status>
pub async fn get_entitlements( &mut self, request: impl IntoRequest<GetEntitlementsRequest>, ) -> Result<Response<GetEntitlementsResponse>, Status>
Returns entitlements for the authenticated account.
pub async fn delete_account(
&mut self,
request: impl IntoRequest<DeleteAccountRequest>,
) -> Result<Response<DeleteAccountResponse>, Status>
pub async fn delete_account( &mut self, request: impl IntoRequest<DeleteAccountRequest>, ) -> Result<Response<DeleteAccountResponse>, Status>
Deletes the authenticated account, purging all associated data in the process.
pub async fn set_registration_lock(
&mut self,
request: impl IntoRequest<SetRegistrationLockRequest>,
) -> Result<Response<SetRegistrationLockResponse>, Status>
pub async fn set_registration_lock( &mut self, request: impl IntoRequest<SetRegistrationLockRequest>, ) -> Result<Response<SetRegistrationLockResponse>, Status>
Sets the registration lock secret for the authenticated account. To remove
a registration lock, please use ClearRegistrationLock.
pub async fn clear_registration_lock(
&mut self,
request: impl IntoRequest<ClearRegistrationLockRequest>,
) -> Result<Response<ClearRegistrationLockResponse>, Status>
pub async fn clear_registration_lock( &mut self, request: impl IntoRequest<ClearRegistrationLockRequest>, ) -> Result<Response<ClearRegistrationLockResponse>, Status>
Removes any registration lock credentials from the authenticated account.
pub async fn reserve_username_hash(
&mut self,
request: impl IntoRequest<ReserveUsernameHashRequest>,
) -> Result<Response<ReserveUsernameHashResponse>, Status>
pub async fn reserve_username_hash( &mut self, request: impl IntoRequest<ReserveUsernameHashRequest>, ) -> Result<Response<ReserveUsernameHashResponse>, Status>
Attempts to reserve one of multiple given username hashes. Reserved
usernames may be claimed later via ConfirmUsernameHash.
pub async fn confirm_username_hash(
&mut self,
request: impl IntoRequest<ConfirmUsernameHashRequest>,
) -> Result<Response<ConfirmUsernameHashResponse>, Status>
pub async fn confirm_username_hash( &mut self, request: impl IntoRequest<ConfirmUsernameHashRequest>, ) -> Result<Response<ConfirmUsernameHashResponse>, Status>
Sets the username hash/encrypted username to a previously-reserved value
(see ReserveUsernameHash).
pub async fn delete_username_hash(
&mut self,
request: impl IntoRequest<DeleteUsernameHashRequest>,
) -> Result<Response<DeleteUsernameHashResponse>, Status>
pub async fn delete_username_hash( &mut self, request: impl IntoRequest<DeleteUsernameHashRequest>, ) -> Result<Response<DeleteUsernameHashResponse>, Status>
Clears the current username hash, ciphertext, and link for the authenticated user.
pub async fn set_username_link(
&mut self,
request: impl IntoRequest<SetUsernameLinkRequest>,
) -> Result<Response<SetUsernameLinkResponse>, Status>
pub async fn set_username_link( &mut self, request: impl IntoRequest<SetUsernameLinkRequest>, ) -> Result<Response<SetUsernameLinkResponse>, Status>
Associates the given username ciphertext with the account, replacing any previously stored ciphertext. A new link handle will optionally be created, and the link handle to use will be returned in any event.
pub async fn delete_username_link(
&mut self,
request: impl IntoRequest<DeleteUsernameLinkRequest>,
) -> Result<Response<DeleteUsernameLinkResponse>, Status>
pub async fn delete_username_link( &mut self, request: impl IntoRequest<DeleteUsernameLinkRequest>, ) -> Result<Response<DeleteUsernameLinkResponse>, Status>
Clears any username link associated with the authenticated account.
pub async fn configure_unidentified_access(
&mut self,
request: impl IntoRequest<ConfigureUnidentifiedAccessRequest>,
) -> Result<Response<ConfigureUnidentifiedAccessResponse>, Status>
pub async fn configure_unidentified_access( &mut self, request: impl IntoRequest<ConfigureUnidentifiedAccessRequest>, ) -> Result<Response<ConfigureUnidentifiedAccessResponse>, Status>
Configures “unidentified access” keys and preferences for the authenticated account. Other users permitted to interact with this account anonymously may take actions like fetching pre-keys and profiles for this account or sending sealed-sender messages without providing identifying credentials.
pub async fn set_discoverable_by_phone_number(
&mut self,
request: impl IntoRequest<SetDiscoverableByPhoneNumberRequest>,
) -> Result<Response<SetDiscoverableByPhoneNumberResponse>, Status>
pub async fn set_discoverable_by_phone_number( &mut self, request: impl IntoRequest<SetDiscoverableByPhoneNumberRequest>, ) -> Result<Response<SetDiscoverableByPhoneNumberResponse>, Status>
Sets whether the authenticated account may be discovered by phone number via the Contact Discovery Service (CDS).
pub async fn set_registration_recovery_password(
&mut self,
request: impl IntoRequest<SetRegistrationRecoveryPasswordRequest>,
) -> Result<Response<SetRegistrationRecoveryPasswordResponse>, Status>
pub async fn set_registration_recovery_password( &mut self, request: impl IntoRequest<SetRegistrationRecoveryPasswordRequest>, ) -> Result<Response<SetRegistrationRecoveryPasswordResponse>, Status>
Sets the registration recovery password for the authenticated account.
pub async fn set_zk_credential_key(
&mut self,
request: impl IntoRequest<SetZkCredentialKeyRequest>,
) -> Result<Response<SetZkCredentialKeyResponse>, Status>
pub async fn set_zk_credential_key( &mut self, request: impl IntoRequest<SetZkCredentialKeyRequest>, ) -> Result<Response<SetZkCredentialKeyResponse>, Status>
Store a public key used to issue and verify zero-knowledge (anonymous) credentials for the account.
pub async fn change_number(
&mut self,
request: impl IntoRequest<ChangeNumberRequest>,
) -> Result<Response<ChangeNumberResponse>, Status>
pub async fn change_number( &mut self, request: impl IntoRequest<ChangeNumberRequest>, ) -> Result<Response<ChangeNumberResponse>, Status>
Changes the phone number associated with the authenticated account.
pub async fn get_account_data_report(
&mut self,
request: impl IntoRequest<GetAccountDataReportRequest>,
) -> Result<Response<GetAccountDataReportResponse>, Status>
pub async fn get_account_data_report( &mut self, request: impl IntoRequest<GetAccountDataReportRequest>, ) -> Result<Response<GetAccountDataReportResponse>, Status>
Produces a report of non-ephemeral account data stored by the service
pub async fn get_capabilities(
&mut self,
request: impl IntoRequest<GetCapabilitiesRequest>,
) -> Result<Response<GetCapabilitiesResponse>, Status>
pub async fn get_capabilities( &mut self, request: impl IntoRequest<GetCapabilitiesRequest>, ) -> Result<Response<GetCapabilitiesResponse>, Status>
Gets the capabilities for the authenticated account.
pub async fn generate_totp_key(
&mut self,
request: impl IntoRequest<GenerateTotpKeyRequest>,
) -> Result<Response<GenerateTotpKeyResponse>, Status>
pub async fn generate_totp_key( &mut self, request: impl IntoRequest<GenerateTotpKeyRequest>, ) -> Result<Response<GenerateTotpKeyResponse>, Status>
Generates and stores a pending TOTP key for the authenticated account.
To “activate” the key, callers must call the ConfirmTotpKey endpoint.
TOTP keys may only be generated for accounts without phone numbers.
pub async fn confirm_totp_key(
&mut self,
request: impl IntoRequest<ConfirmTotpKeyRequest>,
) -> Result<Response<ConfirmTotpKeyResponse>, Status>
pub async fn confirm_totp_key( &mut self, request: impl IntoRequest<ConfirmTotpKeyRequest>, ) -> Result<Response<ConfirmTotpKeyResponse>, Status>
Confirms that the caller has stored and can derive one-time passwords from
a pending TOTP key generated via GenerateTotpKey and stores/activates the
key for the caller’s account
TOTP keys may only be generated for accounts without phone numbers.
pub async fn start_web_authn_registration(
&mut self,
request: impl IntoRequest<StartWebAuthnRegistrationRequest>,
) -> Result<Response<StartWebAuthnRegistrationResponse>, Status>
pub async fn start_web_authn_registration( &mut self, request: impl IntoRequest<StartWebAuthnRegistrationRequest>, ) -> Result<Response<StartWebAuthnRegistrationResponse>, Status>
Returns parameters for initiating a WebAuthn registration ceremony
WebAuthn credentials may only be registered for accounts without phone numbers
pub async fn finish_web_authn_registration(
&mut self,
request: impl IntoRequest<FinishWebAuthnRegistrationRequest>,
) -> Result<Response<FinishWebAuthnRegistrationResponse>, Status>
pub async fn finish_web_authn_registration( &mut self, request: impl IntoRequest<FinishWebAuthnRegistrationRequest>, ) -> Result<Response<FinishWebAuthnRegistrationResponse>, Status>
Concludes a WebAuthn registration ceremony to add a passkey to the authenticated account
WebAuthn credentials may only be registered for accounts without phone numbers
pub async fn list_mfa_keys(
&mut self,
request: impl IntoRequest<ListMfaKeysRequest>,
) -> Result<Response<ListMfaKeysResponse>, Status>
pub async fn list_mfa_keys( &mut self, request: impl IntoRequest<ListMfaKeysRequest>, ) -> Result<Response<ListMfaKeysResponse>, Status>
Returns a list of confirmed MFA keys for the authenticated account
pub async fn set_mfa_key_metadata(
&mut self,
request: impl IntoRequest<SetMfaKeyMetadataRequest>,
) -> Result<Response<SetMfaKeyMetadataResponse>, Status>
pub async fn set_mfa_key_metadata( &mut self, request: impl IntoRequest<SetMfaKeyMetadataRequest>, ) -> Result<Response<SetMfaKeyMetadataResponse>, Status>
Updates encrypted, user-supplied metadata (e.g. a human-readable name and creation timestamp) for an existing, confirmed MFA key
pub async fn remove_mfa_key(
&mut self,
request: impl IntoRequest<RemoveMfaKeyRequest>,
) -> Result<Response<RemoveMfaKeyResponse>, Status>
pub async fn remove_mfa_key( &mut self, request: impl IntoRequest<RemoveMfaKeyRequest>, ) -> Result<Response<RemoveMfaKeyResponse>, Status>
Removes an MFA key from the authenticated account
pub async fn start_mfa_verification(
&mut self,
request: impl IntoRequest<StartMfaVerificationRequest>,
) -> Result<Response<StartMfaVerificationResponse>, Status>
pub async fn start_mfa_verification( &mut self, request: impl IntoRequest<StartMfaVerificationRequest>, ) -> Result<Response<StartMfaVerificationResponse>, Status>
Requests the parameters needed to verify with an MFA factor associated with this account.
pub async fn finish_mfa_verification(
&mut self,
request: impl IntoRequest<FinishMfaVerificationRequest>,
) -> Result<Response<FinishMfaVerificationResponse>, Status>
pub async fn finish_mfa_verification( &mut self, request: impl IntoRequest<FinishMfaVerificationRequest>, ) -> Result<Response<FinishMfaVerificationResponse>, Status>
Attemps to verify an MFA factor associated with this account.
Trait Implementations§
§impl<T> Clone for AccountsClient<T>where
T: Clone,
impl<T> Clone for AccountsClient<T>where
T: Clone,
§fn clone(&self) -> AccountsClient<T>
fn clone(&self) -> AccountsClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for AccountsClient<T>
impl<T> RefUnwindSafe for AccountsClient<T>where
T: RefUnwindSafe,
impl<T> Send for AccountsClient<T>where
T: Send,
impl<T> Sync for AccountsClient<T>where
T: Sync,
impl<T> Unpin for AccountsClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for AccountsClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AccountsClient<T>where
T: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].