pub fn block_on<F, T>(async_op: F) -> Result<T>Expand description
Block on an async function with a generic return type
Similar to execute but supports any return type, not just Result<()>.
Used for domain functions that return values.
§Examples
ⓘ
use ggen_utils::error::Result;
fn get_data() -> Result<String> {
crate::runtime::block_on(async {
Ok("data".to_string())
})
}