[−][src]Function embly::run
pub fn run(to_run: fn(_: Comm) -> Result<()>)
Run a function
use std::io; use std::io::Read; use std::io::Write; fn execute(mut comm: embly::Comm) -> io::Result<()> { comm.write_all(b"Hello\n")?; let mut out = Vec::new(); comm.read_to_end(&mut out)?; println!("{:?}", out); Ok(()) } fn main() { embly::run(execute); }