pub struct WebSocketTransport { /* private fields */ }Expand description
Tokio WebSocket transport for protocol clients.
Implementations§
Source§impl WebSocketTransport
impl WebSocketTransport
Sourcepub async fn connect_with_token(
url: &str,
token: &str,
) -> Result<Self, TransportError>
pub async fn connect_with_token( url: &str, token: &str, ) -> Result<Self, TransportError>
Connect to a validated daemon endpoint with an explicit per-run bearer token.
Trait Implementations§
Source§impl Transport for WebSocketTransport
impl Transport for WebSocketTransport
fn send<'life0, 'async_trait>(
&'life0 mut self,
frame: MessageFrame,
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn recv<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<MessageFrame>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !Freeze for WebSocketTransport
impl !RefUnwindSafe for WebSocketTransport
impl !UnwindSafe for WebSocketTransport
impl Send for WebSocketTransport
impl Sync for WebSocketTransport
impl Unpin for WebSocketTransport
impl UnsafeUnpin for WebSocketTransport
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