Attribute Macro ut::wrap[][src]

#[wrap]

Wraps an async function in order to make it synchronous

Examples

#[ut::wrap]
async fn foo(input: &str) -> String {
 format!("I am {} now", input)
}

let out = foo("sync");
assert_eq!(out, "I am sync now".to_owned())