pub struct Feed { /* private fields */ }Expand description
One websocket connection, kept open. Dropping the feed closes it.
Implementations§
Source§impl Feed
impl Feed
Sourcepub fn start(session: Session) -> Feed
pub fn start(session: Session) -> Feed
Connects to the session’s network on the current tokio runtime.
Sourcepub fn start_at(url: impl Into<String>, session: Session) -> Feed
pub fn start_at(url: impl Into<String>, session: Session) -> Feed
Connects to url instead of the session’s network: a proxy, or a test.
Sourcepub async fn subscribe(
&self,
subscription: Subscription,
) -> Result<(), FeedError>
pub async fn subscribe( &self, subscription: Subscription, ) -> Result<(), FeedError>
Wants subscription from now on, across reconnects. Refused past the
session’s limits.
pub fn unsubscribe(&self, subscription: Subscription) -> Result<(), FeedError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Feed
impl RefUnwindSafe for Feed
impl Send for Feed
impl Sync for Feed
impl Unpin for Feed
impl UnsafeUnpin for Feed
impl UnwindSafe for Feed
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