Features
How it works
The library is available on crates.io. Simply add the next line to your project's Cargo.toml
.
toml
online = "3.0.1"
The async-std
runtime is supported by default. But you can explicitly choose the blocking alternative.
toml
online = { version = "3.0.1", default-features = false, features = ["sync"] }
📝 Please visit the examples and the full documentation if you want to learn the details.
```rust use online::check;
async fn main() {
println!("Online? {}", check(None).await.isok());
println!("Online (timeout)? {}", check(Some(5)).await.isok());
println!("Online (Result
)? {:?}", check(None).await.unwrap());
}
```