pub trait IntoInstance: Codelet + Sized {
// Required method
fn into_instance<S: Into<String>>(
self,
name: S,
config: Self::Config,
) -> CodeletInstance<Self>;
}Expand description
All instances of codelets can be converted into a CodeletInstance with into_instance
use nodo::prelude::*;
struct MyCodelet { num: u32 };
impl Codelet for MyCodelet {
type Status = DefaultStatus;
type Config = ();
type Rx = ();
type Tx = ();
type Signals = ();
fn build_bundles(_: &Self::Config) -> (Self::Rx, Self::Tx) { ((),()) }
}
let c = MyCodelet{ num: 42 }.into_instance("my_name", ());Required Methods§
fn into_instance<S: Into<String>>( self, name: S, config: Self::Config, ) -> CodeletInstance<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.