Function std::task::tryUnstable [-]  [+] [src]

pub fn try<T: Send>(f: proc(): Send -> T) -> Result<T, Box<Any + Send>>

Execute a function in a newly-spawned task and return either the return value of the function or an error if the task failed.

This is equivalent to TaskBuilder::new().try.