Struct hrpc::client::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
Generic client implementation with common methods.
Implementations
Creates a new client.
Set the function to modify request headers with before sending the request.
pub async fn execute_request<Req: Message, Resp: Message + Default>(
&mut self,
path: &str,
req: Request<Req>
) -> ClientResult<Resp>
pub async fn execute_request<Req: Message, Resp: Message + Default>(
&mut self,
path: &str,
req: Request<Req>
) -> ClientResult<Resp>
Executes an unary request and returns the decoded response.
pub async fn connect_socket<Req, Resp>(
&self,
path: &str,
req: Request<()>
) -> ClientResult<Socket<Req, Resp>> where
Req: Message + 'static,
Resp: Message + Default + 'static,
pub async fn connect_socket<Req, Resp>(
&self,
path: &str,
req: Request<()>
) -> ClientResult<Socket<Req, Resp>> where
Req: Message + 'static,
Resp: Message + Default + 'static,
Connect a socket with the server and return it.
pub async fn connect_socket_req<Req, Resp>(
&self,
path: &str,
request: Request<Req>
) -> ClientResult<Socket<Req, Resp>> where
Req: Message + Default + 'static,
Resp: Message + Default + 'static,
pub async fn connect_socket_req<Req, Resp>(
&self,
path: &str,
request: Request<Req>
) -> ClientResult<Socket<Req, Resp>> where
Req: Message + Default + 'static,
Resp: Message + Default + 'static,
Connect a socket with the server, send a message and return it.
Used by the server streaming methods.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Convert this to a request.
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more