Struct futuresdr::runtime::message_io::MessageIoBuilder
source · pub struct MessageIoBuilder<T> { /* private fields */ }
Expand description
Message IO builder
Implementations§
source§impl<T: Send> MessageIoBuilder<T>
impl<T: Send> MessageIoBuilder<T>
sourcepub fn new() -> MessageIoBuilder<T>
pub fn new() -> MessageIoBuilder<T>
Create Message IO builder
sourcepub fn add_input(
self,
name: &str,
c: impl for<'a> Fn(&'a mut T, &'a mut WorkIo, &'a mut MessageIo<T>, &'a mut BlockMeta, Pmt) -> Pin<Box<dyn Future<Output = Result<Pmt>> + Send + 'a>> + Send + Sync + 'static
) -> MessageIoBuilder<T>
pub fn add_input( self, name: &str, c: impl for<'a> Fn(&'a mut T, &'a mut WorkIo, &'a mut MessageIo<T>, &'a mut BlockMeta, Pmt) -> Pin<Box<dyn Future<Output = Result<Pmt>> + Send + 'a>> + Send + Sync + 'static ) -> MessageIoBuilder<T>
Add input port
Use the message_handler
macro to define the handler
function
sourcepub fn add_output(self, name: &str) -> MessageIoBuilder<T>
pub fn add_output(self, name: &str) -> MessageIoBuilder<T>
Add output port
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for MessageIoBuilder<T>
impl<T> Send for MessageIoBuilder<T>
impl<T> Sync for MessageIoBuilder<T>
impl<T> Unpin for MessageIoBuilder<T>
impl<T> !UnwindSafe for MessageIoBuilder<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