pub struct WebsocketApiHandle { /* private fields */ }Implementations§
Source§impl WebsocketApiHandle
impl WebsocketApiHandle
pub fn new(configuration: ConfigurationWebsocketApi) -> Self
Sourcepub async fn connect(&self) -> Result<WebsocketApi>
pub async fn connect(&self) -> Result<WebsocketApi>
Connects to the WebSocket API using default configuration.
§Returns
A Result containing the connected WebsocketApi instance if successful,
or an error if the connection fails.
§Errors
Returns an anyhow::Error if the connection fails.
Sourcepub async fn connect_with_config(
&self,
cfg: WebsocketApiConnectConfig,
) -> Result<WebsocketApi>
pub async fn connect_with_config( &self, cfg: WebsocketApiConnectConfig, ) -> Result<WebsocketApi>
Connects to the WebSocket API with a custom configuration.
§Arguments
cfg- A configuration object specifying connection parameters.
§Returns
A Result containing the connected WebsocketApi instance if successful,
or an error if the connection fails.
§Errors
Returns an anyhow::Error if the connection fails.
Trait Implementations§
Source§impl Clone for WebsocketApiHandle
impl Clone for WebsocketApiHandle
Source§fn clone(&self) -> WebsocketApiHandle
fn clone(&self) -> WebsocketApiHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Freeze for WebsocketApiHandle
impl !RefUnwindSafe for WebsocketApiHandle
impl !UnwindSafe for WebsocketApiHandle
impl Send for WebsocketApiHandle
impl Sync for WebsocketApiHandle
impl Unpin for WebsocketApiHandle
impl UnsafeUnpin for WebsocketApiHandle
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