Expand description
§arta-tokio
Arta-tokio is a crate that provides an implementation of arta abstractions for Tokio runtime.
§Installation
Add a following dependencies to your Cargo.toml:
[dependencies]
arta-tokio = "0.1.0"
arta = "0.1.0"
tokio = { version = "^1", features = ["full"] }§Usage
ⓘ
#[tokio::main]
async fn main() {
// After tokio runtime was initialized just call methods on `TokioGlobalRuntime` to use
// this crate.
// Example:
let hosts = TokioGlobalRuntime.read_to_string("/etc/hosts").await.unwrap();
println!("Hosts: {hosts}");
}Modules§
- fs
fs - Tokio specific filesystem manipulation implementations.
- net
net - Tokio specific TCP/UDP communication implementation.
- process
process - Tokio specific process manipulation implementation.
- task
rt - Tokio specific green thread management implementation.
Structs§
- Tokio
Global Runtime - Struct representing tokio global runtime usage.