Struct ProfileAnonymousClient
pub struct ProfileAnonymousClient<T> { /* private fields */ }Expand description
Provides methods for working with profiles and profile-related data using “unidentified access”
credentials. Callers must not submit any self-identifying credentials
when calling methods in this service and must instead present the targeted account’s
unidentified access key as an anonymous authentication mechanism. Callers
without an unidentified access key should use the equivalent, authenticated
methods in Profile instead.
Implementations§
§impl<T> ProfileAnonymousClient<T>
impl<T> ProfileAnonymousClient<T>
pub fn new(inner: T) -> ProfileAnonymousClient<T>
pub fn with_origin(inner: T, origin: Uri) -> ProfileAnonymousClient<T>
pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> ProfileAnonymousClient<InterceptedService<T, F>>
pub fn send_compressed(
self,
encoding: CompressionEncoding,
) -> ProfileAnonymousClient<T>
pub fn send_compressed( self, encoding: CompressionEncoding, ) -> ProfileAnonymousClient<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,
) -> ProfileAnonymousClient<T>
pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> ProfileAnonymousClient<T>
Enable decompressing responses.
pub fn max_decoding_message_size(
self,
limit: usize,
) -> ProfileAnonymousClient<T>
pub fn max_decoding_message_size( self, limit: usize, ) -> ProfileAnonymousClient<T>
Limits the maximum size of a decoded message.
Default: 4MB
pub fn max_encoding_message_size(
self,
limit: usize,
) -> ProfileAnonymousClient<T>
pub fn max_encoding_message_size( self, limit: usize, ) -> ProfileAnonymousClient<T>
Limits the maximum size of an encoded message.
Default: usize::MAX
pub async fn get_profile(
&mut self,
request: impl IntoRequest<GetProfileAnonymousRequest>,
) -> Result<Response<GetProfileAnonymousResponse>, Status>
pub async fn get_profile( &mut self, request: impl IntoRequest<GetProfileAnonymousRequest>, ) -> Result<Response<GetProfileAnonymousResponse>, Status>
Retrieves profile data.
pub async fn get_profile_key_credential(
&mut self,
request: impl IntoRequest<GetProfileKeyCredentialRequest>,
) -> Result<Response<GetProfileKeyCredentialResponse>, Status>
pub async fn get_profile_key_credential( &mut self, request: impl IntoRequest<GetProfileKeyCredentialRequest>, ) -> Result<Response<GetProfileKeyCredentialResponse>, Status>
Retrieves a profile key credential.
pub async fn get_avatar_upload_form(
&mut self,
request: impl IntoRequest<GetAvatarUploadFormRequest>,
) -> Result<Response<GetAvatarUploadFormResponse>, Status>
pub async fn get_avatar_upload_form( &mut self, request: impl IntoRequest<GetAvatarUploadFormRequest>, ) -> Result<Response<GetAvatarUploadFormResponse>, Status>
Returns a credential to upload a v2 avatar. After uploading the avatar, the client
must call SetProfile with the new avatar URL in the encrypted data.
Because avatars are uploaded anonymously, they have an expiration equal to the idle account expiration. Clients must periodically (recommended: every 90 days) call ExtendAvatarTTL to extend the TTl.
Note: any existing avatar associated with this credential will be deleted immediately
pub async fn extend_avatar_ttl(
&mut self,
request: impl IntoRequest<ExtendAvatarTtlRequest>,
) -> Result<Response<ExtendAvatarTtlResponse>, Status>
pub async fn extend_avatar_ttl( &mut self, request: impl IntoRequest<ExtendAvatarTtlRequest>, ) -> Result<Response<ExtendAvatarTtlResponse>, Status>
Extends the TTL of the avatar currently associated with the request’s avatar auth credential
pub async fn delete_avatar(
&mut self,
request: impl IntoRequest<DeleteAvatarRequest>,
) -> Result<Response<DeleteAvatarResponse>, Status>
pub async fn delete_avatar( &mut self, request: impl IntoRequest<DeleteAvatarRequest>, ) -> Result<Response<DeleteAvatarResponse>, Status>
Deletes the avatar currently associated with the request’s avatar auth credential.
Clients must also call SetProfile to remove the avatar from the encrypted data.
Trait Implementations§
§impl<T> Clone for ProfileAnonymousClient<T>where
T: Clone,
impl<T> Clone for ProfileAnonymousClient<T>where
T: Clone,
§fn clone(&self) -> ProfileAnonymousClient<T>
fn clone(&self) -> ProfileAnonymousClient<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 ProfileAnonymousClient<T>
impl<T> RefUnwindSafe for ProfileAnonymousClient<T>where
T: RefUnwindSafe,
impl<T> Send for ProfileAnonymousClient<T>where
T: Send,
impl<T> Sync for ProfileAnonymousClient<T>where
T: Sync,
impl<T> Unpin for ProfileAnonymousClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for ProfileAnonymousClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ProfileAnonymousClient<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].