Attribute Macro ut::clone [−][src]
#[clone]
Clones an async function in order to make it also synchronous
This will add _blocking to the name of the function to clone.
Examples
#[ut::clone] async fn foo(input: &str) -> String { format!("I am {} now", input) } let out = foo_blocking("sync"); assert_eq!(out, "I am sync now".to_owned())