pub struct SocketBuilderClient { /* private fields */ }Implementations§
Source§impl SocketBuilderClient
impl SocketBuilderClient
pub fn new(wapm: &str) -> Self
pub fn new_with_instance(wapm: &str, instance: &str, access_token: &str) -> Self
pub fn attach(handle: CallHandle) -> Self
pub fn wait(self) -> Result<(), BusError>
pub fn try_wait(&mut self) -> Result<Option<()>, BusError>
pub async fn connect( &self, url: String, state_change: Box<dyn Fn(SocketState) + Send + Sync + 'static>, receive: Box<dyn Fn(Vec<u8>) + Send + Sync + 'static>, ) -> Result<Arc<dyn WebSocket>, BusError>
pub fn blocking_connect( &self, url: String, state_change: Box<dyn Fn(SocketState) + Send + Sync + 'static>, receive: Box<dyn Fn(Vec<u8>) + Send + Sync + 'static>, ) -> Result<Arc<dyn WebSocket>, BusError>
Trait Implementations§
Source§impl Clone for SocketBuilderClient
impl Clone for SocketBuilderClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SocketBuilderClient
impl Debug for SocketBuilderClient
Source§impl Future for SocketBuilderClient
impl Future for SocketBuilderClient
Source§impl SocketBuilder for SocketBuilderClient
impl SocketBuilder for SocketBuilderClient
fn connect<'life0, 'async_trait>(
&'life0 self,
url: String,
state_change: Box<dyn Fn(SocketState) + Send + Sync + 'static>,
receive: Box<dyn Fn(Vec<u8>) + Send + Sync + 'static>,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn WebSocket>, BusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blocking_connect( &self, url: String, state_change: Box<dyn Fn(SocketState) + Send + Sync + 'static>, receive: Box<dyn Fn(Vec<u8>) + Send + Sync + 'static>, ) -> Result<Arc<dyn WebSocket>, BusError>
fn as_client(&self) -> Option<SocketBuilderClient>
Auto Trait Implementations§
impl Freeze for SocketBuilderClient
impl !RefUnwindSafe for SocketBuilderClient
impl Send for SocketBuilderClient
impl Sync for SocketBuilderClient
impl Unpin for SocketBuilderClient
impl !UnwindSafe for SocketBuilderClient
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more