pub enum Client {
None,
Tcp(TcpClient),
Ssl(SslClient),
}Variants§
Implementations§
Source§impl Client
impl Client
pub fn new() -> Self
pub fn tcp(self, url: &str, port: u16) -> Self
pub fn new_tcp(url: &str, port: u16) -> Self
pub fn ssl(self, url: &str, port: u16) -> Self
pub fn new_ssl(url: &str, port: u16) -> Self
pub fn new_ssl_maybe(url: &str, port: u16, ssl: bool) -> Self
pub fn read_timeout(self, timeout: Option<Duration>) -> Self
pub fn set_read_timeout( &mut self, timeout: Option<Duration>, ) -> Result<(), Error>
pub fn write_timeout(self, timeout: Option<Duration>) -> Self
pub fn set_write_timeout( &mut self, timeout: Option<Duration>, ) -> Result<(), Error>
pub fn verif_certificate(self, verif: bool) -> Self
pub fn connect(&mut self)
pub fn is_connected(&self) -> bool
pub fn try_connect(&mut self) -> Result<(), Error>
pub fn try_connect_retry( &mut self, retry: usize, delay: Duration, ) -> Result<(), Error>
pub fn send(&mut self, request: &Request)
pub fn send_str(&mut self, request: &str)
pub fn try_send_batch(&mut self, requests: Vec<&Request>) -> Result<(), Error>
pub fn try_send(&mut self, request: &Request) -> Result<(), Error>
pub fn try_send_str(&mut self, request: &str) -> Result<(), Error>
pub fn recv( &mut self, index: &HashMap<usize, Request>, ) -> Result<Vec<Response>, Error>
pub fn recv_str(&mut self) -> Result<String, Error>
pub fn try_recv( &mut self, index: &HashMap<usize, Request>, ) -> Result<Option<Vec<Response>>, Error>
pub fn try_recv_str(&mut self) -> Result<Option<String>, Error>
pub fn close(&mut self) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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