pub struct Client<T, U> where
    T: Send + Sync + Serialize + 'static,
    U: Send + Sync + DeserializeOwned + 'static, 
{ /* private fields */ }
Expand description

Represents a client that can be used to send requests & receive responses from a server

Implementations

Initializes a client using the provided reader and writer

Initializes a client using the provided framed transport

Convert into underlying channel

Clones the underlying channel for requests and returns the cloned instance

Waits for the client to terminate, which results when the receiving end of the network connection is closed (or the client is shutdown)

Abort the client’s current connection by forcing its tasks to abort

Returns true if client’s underlying event processing has finished/terminated

Methods from Deref<Target = Channel<T, U>>

Returns true if no more requests can be transferred

Sends a request and returns a mailbox that can receive one or more responses, failing if unable to send a request or if the session’s receiving line to the remote server has already been severed

Sends a request and returns a mailbox, timing out after duration has passed

Sends a request and waits for a response, failing if unable to send a request or if the session’s receiving line to the remote server has already been severed

Sends a request and waits for a response, timing out after duration has passed

Sends a request without waiting for a response; this method is able to be used even if the session’s receiving line to the remote server has been severed

Sends a request without waiting for a response, timing out after duration has passed

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Converts to this type from the input type.

Converts to this type from the input type.

Connect to a remote TCP server using the provided information

Connect to a remote TCP server, timing out after duration has passed

Connect to a proxy unix socket

Connect to a proxy unix socket, timing out after duration has passed

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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