I am trying to use: tokio_net
but tokio_net crate does not exist and tokio::net::process within the latest tokio alpha neither.
Maybe I am just confused about how to declare properly this module thing, or is the documentation actually wrong to suggest tokio_net?
The example given in the docs is:
use tokio_net::process::Command;
let command = Command::new("sh");
and in my Cargo.toml I have:
tokio = "^0.2.0-alpha.6"
What exactly do I have to add either in my Cargo.toml or in my use declarations to make this work?
That is more promising but now it complains that future is not implemented for it but of course being able to use this in async-await mode was the reason why I am going into all this trouble in the first place, otherwise I can just use std::process::Command and forget about tokio.
Edit: Thanks to your "features" sugestion, I got it working now. It has to be said though that the documentation is just plain wrong on this point. As to being able to use await, it just needs everything to be put in exactly this order:
let pubpr = Command::new(&path)
.arg(&file)
.status()
.await
.expect("tabwrite: failed to publish");
if !pubpr.success() {
return Err(From::from(format!("tabwrite: publish failed status!"))); };