pub struct Outbound { /* private fields */ }Expand description
The send surface of a stage: typed sends for the data and system lanes.
send_data targets the downstream data lane; send_system targets the
system lane with an explicit Direction. Every send stamps its frame from
one per-link counter shared by both lanes, which is what lets the receiving
side’s flush distinguish frames queued before an Interrupt from frames
queued after it.
Constructed only by link.
Implementations§
Source§impl Outbound
impl Outbound
Sourcepub async fn send_data(&self, frame: DataFrame) -> Result<(), SendError>
pub async fn send_data(&self, frame: DataFrame) -> Result<(), SendError>
Send a data frame downstream.
Takes &self (not &mut self) so a stage can send while it is borrowed
immutably by the run loop. futures’ Sink::send needs &mut, so we
send on a cheap clone of the shared sender; clones feed the same channel.
Sourcepub async fn send_system(
&self,
dir: Direction,
frame: SystemFrame,
) -> Result<(), SendError>
pub async fn send_system( &self, dir: Direction, frame: SystemFrame, ) -> Result<(), SendError>
Send a system frame in the given direction. Takes &self for the same
reason as send_data.
Auto Trait Implementations§
impl !Freeze for Outbound
impl !RefUnwindSafe for Outbound
impl !UnwindSafe for Outbound
impl Send for Outbound
impl Sync for Outbound
impl Unpin for Outbound
impl UnsafeUnpin for Outbound
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