Struct momento_protos::cache_client::scs_client::ScsClient
source · pub struct ScsClient<T> { /* private fields */ }
Implementations§
source§impl<T> ScsClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ScsClient<T>where T: GrpcService<BoxBody>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>( inner: T, interceptor: F ) -> ScsClient<InterceptedService<T, F>>where F: Interceptor, T::ResponseBody: Default, T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>, <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
pub async fn get( &mut self, request: impl IntoRequest<GetRequest> ) -> Result<Response<GetResponse>, Status>
pub async fn set( &mut self, request: impl IntoRequest<SetRequest> ) -> Result<Response<SetResponse>, Status>
pub async fn set_if_not_exists( &mut self, request: impl IntoRequest<SetIfNotExistsRequest> ) -> Result<Response<SetIfNotExistsResponse>, Status>
pub async fn delete( &mut self, request: impl IntoRequest<DeleteRequest> ) -> Result<Response<DeleteResponse>, Status>
pub async fn keys_exist( &mut self, request: impl IntoRequest<KeysExistRequest> ) -> Result<Response<KeysExistResponse>, Status>
pub async fn increment( &mut self, request: impl IntoRequest<IncrementRequest> ) -> Result<Response<IncrementResponse>, Status>
pub async fn update_ttl( &mut self, request: impl IntoRequest<UpdateTtlRequest> ) -> Result<Response<UpdateTtlResponse>, Status>
pub async fn item_get_ttl( &mut self, request: impl IntoRequest<ItemGetTtlRequest> ) -> Result<Response<ItemGetTtlResponse>, Status>
pub async fn item_get_type( &mut self, request: impl IntoRequest<ItemGetTypeRequest> ) -> Result<Response<ItemGetTypeResponse>, Status>
pub async fn dictionary_get( &mut self, request: impl IntoRequest<DictionaryGetRequest> ) -> Result<Response<DictionaryGetResponse>, Status>
pub async fn dictionary_fetch( &mut self, request: impl IntoRequest<DictionaryFetchRequest> ) -> Result<Response<DictionaryFetchResponse>, Status>
pub async fn dictionary_set( &mut self, request: impl IntoRequest<DictionarySetRequest> ) -> Result<Response<DictionarySetResponse>, Status>
pub async fn dictionary_increment( &mut self, request: impl IntoRequest<DictionaryIncrementRequest> ) -> Result<Response<DictionaryIncrementResponse>, Status>
pub async fn dictionary_delete( &mut self, request: impl IntoRequest<DictionaryDeleteRequest> ) -> Result<Response<DictionaryDeleteResponse>, Status>
pub async fn dictionary_length( &mut self, request: impl IntoRequest<DictionaryLengthRequest> ) -> Result<Response<DictionaryLengthResponse>, Status>
pub async fn set_fetch( &mut self, request: impl IntoRequest<SetFetchRequest> ) -> Result<Response<SetFetchResponse>, Status>
pub async fn set_union( &mut self, request: impl IntoRequest<SetUnionRequest> ) -> Result<Response<SetUnionResponse>, Status>
pub async fn set_difference( &mut self, request: impl IntoRequest<SetDifferenceRequest> ) -> Result<Response<SetDifferenceResponse>, Status>
pub async fn set_contains( &mut self, request: impl IntoRequest<SetContainsRequest> ) -> Result<Response<SetContainsResponse>, Status>
pub async fn set_length( &mut self, request: impl IntoRequest<SetLengthRequest> ) -> Result<Response<SetLengthResponse>, Status>
pub async fn list_push_front( &mut self, request: impl IntoRequest<ListPushFrontRequest> ) -> Result<Response<ListPushFrontResponse>, Status>
pub async fn list_push_back( &mut self, request: impl IntoRequest<ListPushBackRequest> ) -> Result<Response<ListPushBackResponse>, Status>
pub async fn list_pop_front( &mut self, request: impl IntoRequest<ListPopFrontRequest> ) -> Result<Response<ListPopFrontResponse>, Status>
pub async fn list_pop_back( &mut self, request: impl IntoRequest<ListPopBackRequest> ) -> Result<Response<ListPopBackResponse>, Status>
pub async fn list_erase( &mut self, request: impl IntoRequest<ListEraseRequest> ) -> Result<Response<ListEraseResponse>, Status>
pub async fn list_remove( &mut self, request: impl IntoRequest<ListRemoveRequest> ) -> Result<Response<ListRemoveResponse>, Status>
pub async fn list_fetch( &mut self, request: impl IntoRequest<ListFetchRequest> ) -> Result<Response<ListFetchResponse>, Status>
pub async fn list_length( &mut self, request: impl IntoRequest<ListLengthRequest> ) -> Result<Response<ListLengthResponse>, Status>
pub async fn list_concatenate_front( &mut self, request: impl IntoRequest<ListConcatenateFrontRequest> ) -> Result<Response<ListConcatenateFrontResponse>, Status>
pub async fn list_concatenate_back( &mut self, request: impl IntoRequest<ListConcatenateBackRequest> ) -> Result<Response<ListConcatenateBackResponse>, Status>
pub async fn list_retain( &mut self, request: impl IntoRequest<ListRetainRequest> ) -> Result<Response<ListRetainResponse>, Status>
sourcepub async fn sorted_set_put(
&mut self,
request: impl IntoRequest<SortedSetPutRequest>
) -> Result<Response<SortedSetPutResponse>, Status>
pub async fn sorted_set_put( &mut self, request: impl IntoRequest<SortedSetPutRequest> ) -> Result<Response<SortedSetPutResponse>, Status>
Add or Updates new element with its score to the Sorted Set. If sorted set doesn’t exist, a new one is created with the specified element and its associated score. If an element exists, then its associate score gets overridden with the one provided in this operation.
sourcepub async fn sorted_set_fetch(
&mut self,
request: impl IntoRequest<SortedSetFetchRequest>
) -> Result<Response<SortedSetFetchResponse>, Status>
pub async fn sorted_set_fetch( &mut self, request: impl IntoRequest<SortedSetFetchRequest> ) -> Result<Response<SortedSetFetchResponse>, Status>
Fetches a subset of elements in the sorted set.
sourcepub async fn sorted_set_get_score(
&mut self,
request: impl IntoRequest<SortedSetGetScoreRequest>
) -> Result<Response<SortedSetGetScoreResponse>, Status>
pub async fn sorted_set_get_score( &mut self, request: impl IntoRequest<SortedSetGetScoreRequest> ) -> Result<Response<SortedSetGetScoreResponse>, Status>
Gets the specified element and its associated score if it exists in the sorted set.
sourcepub async fn sorted_set_remove(
&mut self,
request: impl IntoRequest<SortedSetRemoveRequest>
) -> Result<Response<SortedSetRemoveResponse>, Status>
pub async fn sorted_set_remove( &mut self, request: impl IntoRequest<SortedSetRemoveRequest> ) -> Result<Response<SortedSetRemoveResponse>, Status>
Removes specified elements and their associated scores
sourcepub async fn sorted_set_increment(
&mut self,
request: impl IntoRequest<SortedSetIncrementRequest>
) -> Result<Response<SortedSetIncrementResponse>, Status>
pub async fn sorted_set_increment( &mut self, request: impl IntoRequest<SortedSetIncrementRequest> ) -> Result<Response<SortedSetIncrementResponse>, Status>
Changes the score associated with the element by specified amount. If the provided amount is negative, then the score associated with the element is decremented. If the element that needs to be incremented isn’t present in the sorted set, it is added with specified number as the score. If the set itself doesn’t exist then a new one with specified element and score is created.
sourcepub async fn sorted_set_get_rank(
&mut self,
request: impl IntoRequest<SortedSetGetRankRequest>
) -> Result<Response<SortedSetGetRankResponse>, Status>
pub async fn sorted_set_get_rank( &mut self, request: impl IntoRequest<SortedSetGetRankRequest> ) -> Result<Response<SortedSetGetRankResponse>, Status>
Gives the rank of an element.
sourcepub async fn sorted_set_length(
&mut self,
request: impl IntoRequest<SortedSetLengthRequest>
) -> Result<Response<SortedSetLengthResponse>, Status>
pub async fn sorted_set_length( &mut self, request: impl IntoRequest<SortedSetLengthRequest> ) -> Result<Response<SortedSetLengthResponse>, Status>
Returns length of the sorted set
sourcepub async fn sorted_set_length_by_score(
&mut self,
request: impl IntoRequest<SortedSetLengthByScoreRequest>
) -> Result<Response<SortedSetLengthByScoreResponse>, Status>
pub async fn sorted_set_length_by_score( &mut self, request: impl IntoRequest<SortedSetLengthByScoreRequest> ) -> Result<Response<SortedSetLengthByScoreResponse>, Status>
Returns number of elements in the sorted set between a given min and max score
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for ScsClient<T>where T: RefUnwindSafe,
impl<T> Send for ScsClient<T>where T: Send,
impl<T> Sync for ScsClient<T>where T: Sync,
impl<T> Unpin for ScsClient<T>where T: Unpin,
impl<T> UnwindSafe for ScsClient<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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request