pub struct Client;Expand description
Namespaced entry point, for callers that prefer a type to the free function.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn connect(
config: ClientConfig,
sink: Box<dyn Sink>,
) -> Result<(ClientHandle, EventStream)>
pub async fn connect( config: ClientConfig, sink: Box<dyn Sink>, ) -> Result<(ClientHandle, EventStream)>
Connects to config.server and returns the handle and event stream.
See connect for the details.
Sourcepub async fn connect_with_psks(
config: ClientConfig,
sink: Box<dyn Sink>,
psks: Vec<StoredPsk>,
) -> Result<(ClientHandle, EventStream)>
pub async fn connect_with_psks( config: ClientConfig, sink: Box<dyn Sink>, psks: Vec<StoredPsk>, ) -> Result<(ClientHandle, EventStream)>
Connects with pairing keys the host stores for known servers.
See connect_with_psks for the details.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Client
impl Freeze for Client
impl Move for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin 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