didkit 0.6.0

Library for Verifiable Credentials and Decentralized Identifiers.
Documentation
1
2
3
4
5
6
7
8
9
10
use tokio::runtime::{Builder, Runtime};

use crate::error::Error;

/// Get a [Tokio runtime] for the current thread.
/// [Tokio runtime]: https://docs.rs/tokio/1.2.0/tokio/runtime/struct.Runtime.html
pub fn get() -> Result<Runtime, Error> {
    let rt = Builder::new_current_thread().enable_all().build()?;
    Ok(rt)
}