Struct KeyTransparencyQueryServiceClient
pub struct KeyTransparencyQueryServiceClient<T> { /* private fields */ }Expand description
An external-facing, read-only key transparency service used by Signal’s chat server to look up and monitor identifiers. There are three types of identifier mappings stored by the key transparency log:
- An ACI which maps to an ACI identity key
- An E164-formatted phone number which maps to an ACI
- A username hash which also maps to an ACI
Separately, the log also stores and periodically updates a fixed value known as the
distinguishedkey. Clients use the verified tree head from looking up this key for future calls to the Search and Monitor endpoints.
Note that this service definition is used in two different contexts:
- Implementing the endpoints with rate-limiting and request validation
- Using the generated client stub to forward requests to the remote key transparency service
Implementations§
§impl<T> KeyTransparencyQueryServiceClient<T>
impl<T> KeyTransparencyQueryServiceClient<T>
pub fn new(inner: T) -> KeyTransparencyQueryServiceClient<T>
pub fn with_origin( inner: T, origin: Uri, ) -> KeyTransparencyQueryServiceClient<T>
pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> KeyTransparencyQueryServiceClient<InterceptedService<T, F>>
pub fn send_compressed(
self,
encoding: CompressionEncoding,
) -> KeyTransparencyQueryServiceClient<T>
pub fn send_compressed( self, encoding: CompressionEncoding, ) -> KeyTransparencyQueryServiceClient<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,
) -> KeyTransparencyQueryServiceClient<T>
pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> KeyTransparencyQueryServiceClient<T>
Enable decompressing responses.
pub fn max_decoding_message_size(
self,
limit: usize,
) -> KeyTransparencyQueryServiceClient<T>
pub fn max_decoding_message_size( self, limit: usize, ) -> KeyTransparencyQueryServiceClient<T>
Limits the maximum size of a decoded message.
Default: 4MB
pub fn max_encoding_message_size(
self,
limit: usize,
) -> KeyTransparencyQueryServiceClient<T>
pub fn max_encoding_message_size( self, limit: usize, ) -> KeyTransparencyQueryServiceClient<T>
Limits the maximum size of an encoded message.
Default: usize::MAX
pub async fn distinguished_v2(
&mut self,
request: impl IntoRequest<DistinguishedRequest>,
) -> Result<Response<DistinguishedResponse>, Status>
pub async fn distinguished_v2( &mut self, request: impl IntoRequest<DistinguishedRequest>, ) -> Result<Response<DistinguishedResponse>, Status>
An endpoint used by clients to retrieve the most recent distinguished tree head, which should be used to derive consistency parameters for subsequent Search and Monitor requests. It should be the first key transparency RPC a client calls.
pub async fn search_v2(
&mut self,
request: impl IntoRequest<SearchRequest>,
) -> Result<Response<SearchResponseV2>, Status>
pub async fn search_v2( &mut self, request: impl IntoRequest<SearchRequest>, ) -> Result<Response<SearchResponseV2>, Status>
An endpoint used by clients to search for one or more identifiers in the transparency log. The server returns proof that the identifier(s) exist in the log.
pub async fn monitor_v2(
&mut self,
request: impl IntoRequest<MonitorRequest>,
) -> Result<Response<MonitorResponseV2>, Status>
pub async fn monitor_v2( &mut self, request: impl IntoRequest<MonitorRequest>, ) -> Result<Response<MonitorResponseV2>, Status>
An endpoint that allows users to monitor a group of identifiers by returning proof that the log continues to be constructed correctly in later entries for those identifiers.
Trait Implementations§
§impl<T> Clone for KeyTransparencyQueryServiceClient<T>where
T: Clone,
impl<T> Clone for KeyTransparencyQueryServiceClient<T>where
T: Clone,
§fn clone(&self) -> KeyTransparencyQueryServiceClient<T>
fn clone(&self) -> KeyTransparencyQueryServiceClient<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 KeyTransparencyQueryServiceClient<T>
impl<T> RefUnwindSafe for KeyTransparencyQueryServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for KeyTransparencyQueryServiceClient<T>where
T: Send,
impl<T> Sync for KeyTransparencyQueryServiceClient<T>where
T: Sync,
impl<T> Unpin for KeyTransparencyQueryServiceClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for KeyTransparencyQueryServiceClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for KeyTransparencyQueryServiceClient<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].