Struct KeysAnonymousClient
pub struct KeysAnonymousClient<T> { /* private fields */ }Expand description
Provides methods for working with pre-keys using “unidentified access” credentials.
Implementations§
§impl<T> KeysAnonymousClient<T>
impl<T> KeysAnonymousClient<T>
pub fn new(inner: T) -> KeysAnonymousClient<T>
pub fn with_origin(inner: T, origin: Uri) -> KeysAnonymousClient<T>
pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> KeysAnonymousClient<InterceptedService<T, F>>
pub fn send_compressed(
self,
encoding: CompressionEncoding,
) -> KeysAnonymousClient<T>
pub fn send_compressed( self, encoding: CompressionEncoding, ) -> KeysAnonymousClient<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,
) -> KeysAnonymousClient<T>
pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> KeysAnonymousClient<T>
Enable decompressing responses.
pub fn max_decoding_message_size(self, limit: usize) -> KeysAnonymousClient<T>
pub fn max_decoding_message_size(self, limit: usize) -> KeysAnonymousClient<T>
Limits the maximum size of a decoded message.
Default: 4MB
pub fn max_encoding_message_size(self, limit: usize) -> KeysAnonymousClient<T>
pub fn max_encoding_message_size(self, limit: usize) -> KeysAnonymousClient<T>
Limits the maximum size of an encoded message.
Default: usize::MAX
pub async fn get_pre_keys(
&mut self,
request: impl IntoRequest<GetPreKeysAnonymousRequest>,
) -> Result<Response<GetPreKeysAnonymousResponse>, Status>
pub async fn get_pre_keys( &mut self, request: impl IntoRequest<GetPreKeysAnonymousRequest>, ) -> Result<Response<GetPreKeysAnonymousResponse>, Status>
Retrieves a set of pre-keys for establishing a session with the targeted
device or devices. Callers must not submit any self-identifying credentials
when calling this method 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
method in Keys instead.
pub async fn check_identity_keys(
&mut self,
request: impl IntoStreamingRequest<Message = CheckIdentityKeyRequest>,
) -> Result<Response<Streaming<CheckIdentityKeyResponse>>, Status>
pub async fn check_identity_keys( &mut self, request: impl IntoStreamingRequest<Message = CheckIdentityKeyRequest>, ) -> Result<Response<Streaming<CheckIdentityKeyResponse>>, Status>
Checks identity key fingerprints of the target accounts.
Returns a stream of elements, each one representing an account that had a mismatched identity key fingerprint with the server and the corresponding identity key stored by the server.
Trait Implementations§
§impl<T> Clone for KeysAnonymousClient<T>where
T: Clone,
impl<T> Clone for KeysAnonymousClient<T>where
T: Clone,
§fn clone(&self) -> KeysAnonymousClient<T>
fn clone(&self) -> KeysAnonymousClient<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 KeysAnonymousClient<T>
impl<T> RefUnwindSafe for KeysAnonymousClient<T>where
T: RefUnwindSafe,
impl<T> Send for KeysAnonymousClient<T>where
T: Send,
impl<T> Sync for KeysAnonymousClient<T>where
T: Sync,
impl<T> Unpin for KeysAnonymousClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for KeysAnonymousClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for KeysAnonymousClient<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].