pub struct WebSocketRpcTransport { /* private fields */ }Expand description
RpcTransport implementation of a Dart side WebSocket.
Implementations§
Source§impl WebSocketRpcTransport
impl WebSocketRpcTransport
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new WebSocketRpcTransport which can be connected to the
server with the RpcTransport::connect() method call.
Trait Implementations§
Source§impl Clone for WebSocketRpcTransport
impl Clone for WebSocketRpcTransport
Source§fn clone(&self) -> WebSocketRpcTransport
fn clone(&self) -> WebSocketRpcTransport
Returns a duplicate of the value. Read more
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 WebSocketRpcTransport
impl Debug for WebSocketRpcTransport
Source§impl Default for WebSocketRpcTransport
impl Default for WebSocketRpcTransport
Source§impl Drop for WebSocketRpcTransport
impl Drop for WebSocketRpcTransport
Source§impl RpcTransport for WebSocketRpcTransport
impl RpcTransport for WebSocketRpcTransport
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
url: ApiUrl,
) -> Pin<Box<dyn Future<Output = Result<(), Traced<TransportError>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
url: ApiUrl,
) -> Pin<Box<dyn Future<Output = Result<(), Traced<TransportError>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn on_message(&self) -> LocalBoxStream<'static, ServerMsg>
fn on_message(&self) -> LocalBoxStream<'static, ServerMsg>
Returns
LocalBoxStream of all messages received by this transport.Source§fn set_close_reason(&self, reason: ClientDisconnect)
fn set_close_reason(&self, reason: ClientDisconnect)
Sets reason, that will be sent to remote server when this transport will
be dropped.
Source§fn on_state_change(&self) -> LocalBoxStream<'static, TransportState>
fn on_state_change(&self) -> LocalBoxStream<'static, TransportState>
Subscribes to a
RpcTransport’s TransportState changes.Auto Trait Implementations§
impl !Freeze for WebSocketRpcTransport
impl !RefUnwindSafe for WebSocketRpcTransport
impl !Send for WebSocketRpcTransport
impl !Sync for WebSocketRpcTransport
impl Unpin for WebSocketRpcTransport
impl !UnwindSafe for WebSocketRpcTransport
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