pub struct GrpcClient { /* private fields */ }Expand description
Shared client in app state.
Implementations§
Source§impl GrpcClient
impl GrpcClient
pub fn base(&self) -> &str
pub fn fake(&self) -> Option<&FakeGrpc>
pub async fn call<Req, Res>(
&self,
method: &str,
req: &Req,
) -> Result<Res, GrpcError>where
Req: Serialize,
Res: DeserializeOwned,
pub async fn call_raw( &self, method: &str, body: Bytes, ) -> Result<Bytes, GrpcError>
Trait Implementations§
Source§impl Clone for GrpcClient
impl Clone for GrpcClient
Source§fn clone(&self) -> GrpcClient
fn clone(&self) -> GrpcClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for GrpcClient
impl !UnwindSafe for GrpcClient
impl Freeze for GrpcClient
impl Send for GrpcClient
impl Sync for GrpcClient
impl Unpin for GrpcClient
impl UnsafeUnpin for GrpcClient
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