pub struct SttpGatewayServiceClient<T> {
inner: Grpc<T>,
}Fields§
§inner: Grpc<T>Implementations§
Source§impl<T> SttpGatewayServiceClient<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> SttpGatewayServiceClient<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,
) -> SttpGatewayServiceClient<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 calibrate_session( &mut self, request: impl IntoRequest<CalibrateSessionRequest>, ) -> Result<Response<CalibrateSessionReply>, Status>
pub async fn store_context( &mut self, request: impl IntoRequest<StoreContextRequest>, ) -> Result<Response<StoreContextReply>, Status>
pub async fn get_context( &mut self, request: impl IntoRequest<GetContextRequest>, ) -> Result<Response<GetContextReply>, Status>
pub async fn get_embedding_context( &mut self, request: impl IntoRequest<GetEmbeddingContextRequest>, ) -> Result<Response<GetContextReply>, Status>
pub async fn list_nodes( &mut self, request: impl IntoRequest<ListNodesRequest>, ) -> Result<Response<ListNodesReply>, Status>
pub async fn get_moods( &mut self, request: impl IntoRequest<GetMoodsRequest>, ) -> Result<Response<GetMoodsReply>, Status>
pub async fn batch_rekey( &mut self, request: impl IntoRequest<BatchRekeyRequest>, ) -> Result<Response<BatchRekeyReply>, Status>
pub async fn create_monthly_rollup( &mut self, request: impl IntoRequest<CreateMonthlyRollupRequest>, ) -> Result<Response<CreateMonthlyRollupReply>, Status>
Trait Implementations§
Source§impl<T: Clone> Clone for SttpGatewayServiceClient<T>
impl<T: Clone> Clone for SttpGatewayServiceClient<T>
Source§fn clone(&self) -> SttpGatewayServiceClient<T>
fn clone(&self) -> SttpGatewayServiceClient<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for SttpGatewayServiceClient<T>
impl<T> RefUnwindSafe for SttpGatewayServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for SttpGatewayServiceClient<T>where
T: Send,
impl<T> Sync for SttpGatewayServiceClient<T>where
T: Sync,
impl<T> Unpin for SttpGatewayServiceClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for SttpGatewayServiceClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for SttpGatewayServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 moreSource§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>
Wrap the input message
T in a tonic::Request§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].