pub struct ClientConnect { /* private fields */ }Implementations§
Source§impl ClientConnect
impl ClientConnect
Sourcepub async fn new<C: TfCodec>(
server_name: String,
connection_dest: String,
processor: Option<TrafficProcessorHolder<C>>,
codec: C,
mode: ClientMode,
max_request_in_time: usize,
) -> Result<Self, ClientError>
pub async fn new<C: TfCodec>( server_name: String, connection_dest: String, processor: Option<TrafficProcessorHolder<C>>, codec: C, mode: ClientMode, max_request_in_time: usize, ) -> Result<Self, ClientError>
Creates a client and connects to the server.
server_name: used for TLS SNI; may be empty when not using TLS.connection_dest:host:port, e.g."65.88.95.127:9090".max_request_in_time: capacity of the in-flight request channel.
Sourcepub async fn dispatch_request(
&self,
request: ClientRequest,
) -> Result<(), ClientError>
pub async fn dispatch_request( &self, request: ClientRequest, ) -> Result<(), ClientError>
Dispatches a request to the server.
Auto Trait Implementations§
impl Freeze for ClientConnect
impl RefUnwindSafe for ClientConnect
impl Send for ClientConnect
impl Sync for ClientConnect
impl Unpin for ClientConnect
impl UnsafeUnpin for ClientConnect
impl UnwindSafe for ClientConnect
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