mirror of
https://github.com/aramperes/nut-rs.git
synced 2025-09-08 21:18:31 -04:00
Release 0.5.0
Rename to rups
This commit is contained in:
parent
539d11848e
commit
feef67255f
21 changed files with 51 additions and 47 deletions
24
README.md
24
README.md
|
@ -1,8 +1,8 @@
|
|||
# nut-client
|
||||
# rups
|
||||
|
||||
[](https://crates.io/crates/nut-client)
|
||||
[](https://docs.rs/nut-client)
|
||||
[](./LICENSE)
|
||||
[](https://crates.io/crates/rups)
|
||||
[](https://docs.rs/rups)
|
||||
[](./LICENSE)
|
||||
[](https://github.com/aramperes/nut-client-rs/actions?query=workflow%3ACI)
|
||||
|
||||
A [Network UPS Tools](https://github.com/networkupstools/nut) (NUT) client library for Rust.
|
||||
|
@ -38,15 +38,15 @@ built-in [upsc](https://networkupstools.org/docs/man/upsc.html) tool.
|
|||
Below is a sample program using this library (`cargo run --example blocking`).
|
||||
|
||||
You can also run the async version of this code using
|
||||
`cargo run --example async --features async-rt` (source: `nut-client/examples/async.rs`).
|
||||
`cargo run --example async --features async-rt` (source: `rups/examples/async.rs`).
|
||||
|
||||
```rust
|
||||
// nut-client/examples/blocking.rs
|
||||
// rups/examples/blocking.rs
|
||||
|
||||
use std::env;
|
||||
|
||||
use nut_client::blocking::Connection;
|
||||
use nut_client::{Auth, ConfigBuilder};
|
||||
use rups::blocking::Connection;
|
||||
use rups::{Auth, ConfigBuilder};
|
||||
use std::convert::TryInto;
|
||||
|
||||
fn main() -> nut_client::Result<()> {
|
||||
|
@ -100,7 +100,11 @@ If the server is using a self-signed certificate, and you'd like to ignore the s
|
|||
|
||||
## Async (Tokio)
|
||||
|
||||
The `nut-client` library supports async network requests. This requires the `async` feature, which uses Tokio v1 under
|
||||
the hood.
|
||||
The `rups` library supports async network requests. This requires the `async` feature, which uses Tokio v1 under the
|
||||
hood.
|
||||
|
||||
For SSL support, you must use the `async-ssl` feature as well.
|
||||
|
||||
## Pronunciation
|
||||
|
||||
> r-oops
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue