Struct tonic_web_wasm_client::Client
source · pub struct Client { /* private fields */ }
Expand description
grpc-web
based transport layer for tonic
clients
Implementations§
source§impl Client
impl Client
sourcepub fn new_with_options(base_url: String, options: FetchOptions) -> Self
pub fn new_with_options(base_url: String, options: FetchOptions) -> Self
Creates a new client with options
sourcepub fn with_options(&mut self, options: FetchOptions) -> &mut Self
pub fn with_options(&mut self, options: FetchOptions) -> &mut Self
Sets the options for the client
Trait Implementations§
source§impl Service<Request<UnsyncBoxBody<Bytes, Status>>> for Client
impl Service<Request<UnsyncBoxBody<Bytes, Status>>> for Client
§type Response = Response<ResponseBody>
type Response = Response<ResponseBody>
Responses given by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<Client as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Response, <Client as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Error>>>>
type Future = Pin<Box<dyn Future<Output = Result<<Client as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Response, <Client as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Error>>>>
The future response value.
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T
impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T
§type ResponseBody = ResBody
type ResponseBody = ResBody
Responses body given by the service.
source§fn poll_ready(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<(), <T as GrpcService<ReqBody>>::Error>>
fn poll_ready( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), <T as GrpcService<ReqBody>>::Error>>
Returns
Ready
when the service is able to process requests. Read moresource§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>
Wrap the input message
T
in a tonic::Request