pub struct Stream<P>where
P: Protocol,{ /* private fields */ }Expand description
Decoded message stream over the same opaque router and lease.
Implementations§
Source§impl<P> Stream<P>where
P: Protocol,
impl<P> Stream<P>where
P: Protocol,
Sourcepub async fn send<M>(&self, message: M) -> Result<(), ClientError>where
M: IntoOutboundMessage<P>,
pub async fn send<M>(&self, message: M) -> Result<(), ClientError>where
M: IntoOutboundMessage<P>,
Send a native or already-encoded payload using the selected codec.
Sourcepub async fn recv(&mut self) -> Result<Option<Message>, ClientError>
pub async fn recv(&mut self) -> Result<Option<Message>, ClientError>
Receive an inspectable message, including unknown names and peer errors.
Sourcepub fn into_parts(self) -> (StreamSender<P>, StreamReceiver<P>)
pub fn into_parts(self) -> (StreamSender<P>, StreamReceiver<P>)
Split into owned handles while preserving one receiver and the ID lease.
Auto Trait Implementations§
impl<P> !RefUnwindSafe for Stream<P>
impl<P> !UnwindSafe for Stream<P>
impl<P> Freeze for Stream<P>
impl<P> Send for Stream<P>
impl<P> Sync for Stream<P>
impl<P> Unpin for Stream<P>
impl<P> UnsafeUnpin for Stream<P>where
RawStream<P>: UnsafeUnpin,
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