pub struct Session { /* private fields */ }
Expand description
RPC client session Keeps track of active subscriptions and unsubscribes from them upon dropping.
Implementations§
Source§impl Session
impl Session
Sourcepub fn new(sender: UnboundedSender<String>) -> Self
pub fn new(sender: UnboundedSender<String>) -> Self
Creates new session given transport raw send capabilities.
Session should be created as part of metadata, sender
should be returned by transport.
Sourcepub fn sender(&self) -> UnboundedSender<String>
pub fn sender(&self) -> UnboundedSender<String>
Returns transport write stream
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Session
impl !RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl !UnwindSafe for Session
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