pub struct AsyncClient { /* private fields */ }Implementations§
Source§impl AsyncClient
impl AsyncClient
pub async fn connect<A: ToSocketAddrs>(addr: A) -> Result<Self>
pub async fn call_json<P: AsRef<str>, T: Serialize>( &self, path: P, body: &T, ) -> Result<Value, RepeError>
Sourcepub async fn call_json_with_timeout<P: AsRef<str>, T: Serialize>(
&self,
path: P,
body: &T,
timeout_duration: Duration,
) -> Result<Value, RepeError>
pub async fn call_json_with_timeout<P: AsRef<str>, T: Serialize>( &self, path: P, body: &T, timeout_duration: Duration, ) -> Result<Value, RepeError>
Send a JSON request and fail if no response arrives before timeout_duration.
pub async fn call_typed_json<P: AsRef<str>, T: Serialize, R: DeserializeOwned>( &self, path: P, body: &T, ) -> Result<R, RepeError>
Sourcepub async fn call_typed_json_with_timeout<P: AsRef<str>, T: Serialize, R: DeserializeOwned>(
&self,
path: P,
body: &T,
timeout_duration: Duration,
) -> Result<R, RepeError>
pub async fn call_typed_json_with_timeout<P: AsRef<str>, T: Serialize, R: DeserializeOwned>( &self, path: P, body: &T, timeout_duration: Duration, ) -> Result<R, RepeError>
Send a typed JSON request and fail if no response arrives before timeout_duration.
pub async fn call_typed_beve<P: AsRef<str>, T: Serialize, R: DeserializeOwned>( &self, path: P, body: &T, ) -> Result<R, RepeError>
Sourcepub async fn call_typed_beve_with_timeout<P: AsRef<str>, T: Serialize, R: DeserializeOwned>(
&self,
path: P,
body: &T,
timeout_duration: Duration,
) -> Result<R, RepeError>
pub async fn call_typed_beve_with_timeout<P: AsRef<str>, T: Serialize, R: DeserializeOwned>( &self, path: P, body: &T, timeout_duration: Duration, ) -> Result<R, RepeError>
Send a typed BEVE request and fail if no response arrives before timeout_duration.
pub async fn notify_json<P: AsRef<str>, T: Serialize>( &self, path: P, body: &T, ) -> Result<(), RepeError>
pub async fn notify_typed_json<P: AsRef<str>, T: Serialize>( &self, path: P, body: &T, ) -> Result<(), RepeError>
pub async fn notify_typed_beve<P: AsRef<str>, T: Serialize>( &self, path: P, body: &T, ) -> Result<(), RepeError>
Trait Implementations§
Source§impl Clone for AsyncClient
impl Clone for AsyncClient
Source§fn clone(&self) -> AsyncClient
fn clone(&self) -> AsyncClient
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 Freeze for AsyncClient
impl !RefUnwindSafe for AsyncClient
impl Send for AsyncClient
impl Sync for AsyncClient
impl Unpin for AsyncClient
impl UnsafeUnpin for AsyncClient
impl !UnwindSafe for AsyncClient
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