pub struct ScsClient<T> { /* private fields */ }

Implementations§

source§

impl ScsClient<Channel>

source

pub async fn connect<D>(dst: D) -> Result<Self, Error>where D: TryInto<Endpoint>, D::Error: Into<StdError>,

Attempt to create a new client by connecting to a given endpoint.

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,

source

pub fn new(inner: T) -> Self

source

pub fn with_origin(inner: T, origin: Uri) -> Self

source

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,

source

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.

source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

source

pub async fn get( &mut self, request: impl IntoRequest<GetRequest> ) -> Result<Response<GetResponse>, Status>

source

pub async fn set( &mut self, request: impl IntoRequest<SetRequest> ) -> Result<Response<SetResponse>, Status>

source

pub async fn set_if_not_exists( &mut self, request: impl IntoRequest<SetIfNotExistsRequest> ) -> Result<Response<SetIfNotExistsResponse>, Status>

source

pub async fn delete( &mut self, request: impl IntoRequest<DeleteRequest> ) -> Result<Response<DeleteResponse>, Status>

source

pub async fn keys_exist( &mut self, request: impl IntoRequest<KeysExistRequest> ) -> Result<Response<KeysExistResponse>, Status>

source

pub async fn increment( &mut self, request: impl IntoRequest<IncrementRequest> ) -> Result<Response<IncrementResponse>, Status>

source

pub async fn update_ttl( &mut self, request: impl IntoRequest<UpdateTtlRequest> ) -> Result<Response<UpdateTtlResponse>, Status>

source

pub async fn dictionary_get( &mut self, request: impl IntoRequest<DictionaryGetRequest> ) -> Result<Response<DictionaryGetResponse>, Status>

source

pub async fn dictionary_fetch( &mut self, request: impl IntoRequest<DictionaryFetchRequest> ) -> Result<Response<DictionaryFetchResponse>, Status>

source

pub async fn dictionary_set( &mut self, request: impl IntoRequest<DictionarySetRequest> ) -> Result<Response<DictionarySetResponse>, Status>

source

pub async fn dictionary_increment( &mut self, request: impl IntoRequest<DictionaryIncrementRequest> ) -> Result<Response<DictionaryIncrementResponse>, Status>

source

pub async fn dictionary_delete( &mut self, request: impl IntoRequest<DictionaryDeleteRequest> ) -> Result<Response<DictionaryDeleteResponse>, Status>

source

pub async fn set_fetch( &mut self, request: impl IntoRequest<SetFetchRequest> ) -> Result<Response<SetFetchResponse>, Status>

source

pub async fn set_union( &mut self, request: impl IntoRequest<SetUnionRequest> ) -> Result<Response<SetUnionResponse>, Status>

source

pub async fn set_difference( &mut self, request: impl IntoRequest<SetDifferenceRequest> ) -> Result<Response<SetDifferenceResponse>, Status>

source

pub async fn set_contains( &mut self, request: impl IntoRequest<SetContainsRequest> ) -> Result<Response<SetContainsResponse>, Status>

source

pub async fn list_push_front( &mut self, request: impl IntoRequest<ListPushFrontRequest> ) -> Result<Response<ListPushFrontResponse>, Status>

source

pub async fn list_push_back( &mut self, request: impl IntoRequest<ListPushBackRequest> ) -> Result<Response<ListPushBackResponse>, Status>

source

pub async fn list_pop_front( &mut self, request: impl IntoRequest<ListPopFrontRequest> ) -> Result<Response<ListPopFrontResponse>, Status>

source

pub async fn list_pop_back( &mut self, request: impl IntoRequest<ListPopBackRequest> ) -> Result<Response<ListPopBackResponse>, Status>

source

pub async fn list_erase( &mut self, request: impl IntoRequest<ListEraseRequest> ) -> Result<Response<ListEraseResponse>, Status>

source

pub async fn list_remove( &mut self, request: impl IntoRequest<ListRemoveRequest> ) -> Result<Response<ListRemoveResponse>, Status>

source

pub async fn list_fetch( &mut self, request: impl IntoRequest<ListFetchRequest> ) -> Result<Response<ListFetchResponse>, Status>

source

pub async fn list_length( &mut self, request: impl IntoRequest<ListLengthRequest> ) -> Result<Response<ListLengthResponse>, Status>

source

pub async fn list_concatenate_front( &mut self, request: impl IntoRequest<ListConcatenateFrontRequest> ) -> Result<Response<ListConcatenateFrontResponse>, Status>

source

pub async fn list_concatenate_back( &mut self, request: impl IntoRequest<ListConcatenateBackRequest> ) -> Result<Response<ListConcatenateBackResponse>, Status>

source

pub async fn list_retain( &mut self, request: impl IntoRequest<ListRetainRequest> ) -> Result<Response<ListRetainResponse>, Status>

source

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.

source

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.

source

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.

source

pub async fn sorted_set_remove( &mut self, request: impl IntoRequest<SortedSetRemoveRequest> ) -> Result<Response<SortedSetRemoveResponse>, Status>

Removes specified elements and their associated scores

source

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.

source

pub async fn sorted_set_get_rank( &mut self, request: impl IntoRequest<SortedSetGetRankRequest> ) -> Result<Response<SortedSetGetRankResponse>, Status>

Gives the rank of an element.

Trait Implementations§

source§

impl<T: Clone> Clone for ScsClient<T>

source§

fn clone(&self) -> ScsClient<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug> Debug for ScsClient<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for Twhere T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more