Struct futuresdr::blocks::ChannelSource
source · pub struct ChannelSource<T: Send + 'static> { /* private fields */ }
Expand description
Push samples through a channel into a stream connection.
Outputs
out
: Samples pushed into the channel
Usage
use futuresdr::futures::channel::mpsc;
use futuresdr::blocks::ChannelSource;
use futuresdr::runtime::Flowgraph;
let mut fg = Flowgraph::new();
let (mut tx, rx) = mpsc::channel(10);
let cs = fg.add_block(ChannelSource::<u32>::new(rx));
// start flowgraph
tx.try_send(vec![0, 1, 2].into_boxed_slice());
Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for ChannelSource<T>
impl<T> Send for ChannelSource<T>
impl<T> Sync for ChannelSource<T>where T: Sync,
impl<T> Unpin for ChannelSource<T>
impl<T> !UnwindSafe for ChannelSource<T>
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