pub struct ConnectorClient { /* private fields */ }Expand description
WebSocket client that communicates with tauri-plugin-connector.
Implementations§
Source§impl ConnectorClient
impl ConnectorClient
pub fn new() -> Self
Sourcepub async fn connect(&mut self, host: &str, port: u16) -> Result<(), String>
pub async fn connect(&mut self, host: &str, port: u16) -> Result<(), String>
Connect to the plugin’s WebSocket server.
Sourcepub async fn disconnect(&mut self)
pub async fn disconnect(&mut self)
Disconnect from the WebSocket server.
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if connected.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnectorClient
impl !RefUnwindSafe for ConnectorClient
impl Send for ConnectorClient
impl Sync for ConnectorClient
impl Unpin for ConnectorClient
impl UnsafeUnpin for ConnectorClient
impl !UnwindSafe for ConnectorClient
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