Struct futuresdr::runtime::stream_io::StreamOutput
source · pub struct StreamOutput { /* private fields */ }
Expand description
Stream output port
Implementations§
source§impl StreamOutput
impl StreamOutput
sourcepub fn new<T: Any>(name: &str) -> StreamOutput
pub fn new<T: Any>(name: &str) -> StreamOutput
Create stream output port
sourcepub fn init(&mut self, writer: BufferWriter)
pub fn init(&mut self, writer: BufferWriter)
Initialize port, setting the writer
sourcepub fn add_tag_abs(&mut self, index: usize, tag: Tag)
pub fn add_tag_abs(&mut self, index: usize, tag: Tag)
Add ItemTag
using the absolute index
The difference between add_tag
and add_tag_abs
is only relevant if the work function
calls produce multiple times.
sourcepub fn add_reader(
&mut self,
reader_inbox: Sender<BlockMessage>,
reader_port: usize
) -> BufferReader
pub fn add_reader( &mut self, reader_inbox: Sender<BlockMessage>, reader_port: usize ) -> BufferReader
Connect a downstream reader to the port
sourcepub fn try_as<T: 'static>(&mut self) -> Option<&mut T>
pub fn try_as<T: 'static>(&mut self) -> Option<&mut T>
Try to cast buffer writer to specific type
sourcepub fn slice_unchecked<T>(&mut self) -> &'static mut [T]
pub fn slice_unchecked<T>(&mut self) -> &'static mut [T]
Get buffer content as slice without checking the type
sourcepub async fn notify_finished(&mut self)
pub async fn notify_finished(&mut self)
Notify downstream readers that we are finished
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StreamOutput
impl Send for StreamOutput
impl !Sync for StreamOutput
impl Unpin for StreamOutput
impl !UnwindSafe for StreamOutput
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