pub struct Client { /* private fields */ }
Implementations§
source§impl Client
impl Client
sourcepub fn connect(
addr: impl ToSocketAddrs,
) -> Result<(Self, Receiver<(Direction, String)>), Error>
pub fn connect( addr: impl ToSocketAddrs, ) -> Result<(Self, Receiver<(Direction, String)>), Error>
Connect to a server and create a client instance
sourcepub fn connect_with_options(
addr: impl ToSocketAddrs,
options: &ConnectionOptions,
) -> Result<(Self, Receiver<(Direction, String)>), Error>
pub fn connect_with_options( addr: impl ToSocketAddrs, options: &ConnectionOptions, ) -> Result<(Self, Receiver<(Direction, String)>), Error>
Connect to a server and create a client instance with the defined options
pub fn try_send(&self, data: impl ToString) -> 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)