pub struct WsSource;Expand description
WebSocket source factory.
Implementations§
Source§impl WsSource
impl WsSource
Sourcepub fn connect(
url: Url,
restart: RestartSettings,
) -> Source<Result<WsFrame, WsError>>
pub fn connect( url: Url, restart: RestartSettings, ) -> Source<Result<WsFrame, WsError>>
Connect to url, emitting Ok(WsFrame) per inbound message and
reconnecting with backoff per restart whenever the stream ends or a
connect attempt fails.
A failed connect surfaces as a single Err(WsError::Connect(_)) from
that attempt; the RestartSource then backs off and tries again
(subject to restart.max_restarts).
Auto Trait Implementations§
impl Freeze for WsSource
impl RefUnwindSafe for WsSource
impl Send for WsSource
impl Sync for WsSource
impl Unpin for WsSource
impl UnsafeUnpin for WsSource
impl UnwindSafe for WsSource
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