Crates.io | nftables-async |
lib.rs | nftables-async |
version | 0.2.2 |
source | src |
created_at | 2024-10-27 05:50:16.018193 |
updated_at | 2024-12-01 11:31:10.480244 |
description | An async version of the helper to run nftables, providing full compatibility with the rest of the nftables crate |
homepage | |
repository | https://github.com/kanpov/nftables-async |
max_upload_size | |
id | 1424359 |
size | 13,905 |
An async version of the helper to run nftables in the nftables
crate. Simply add both nftables-async
and nftables
to your crate, then use the nftables_async::apply_ruleset
or nftables_async::get_current_ruleset
to perform manipulations. Everything is compatible with the sync helper, even the error types, the functions, however, return "true" async futures.
To provide the asynchronous I/O, an implementation of the Process
trait in the crate is needed. Two implementations are provided built-in behind feature gates:
TokioProcess
using the Tokio stack, enabled via tokio-process
featureAsyncProcess
using the async-process
crate (Smol stack), enabled via async-process
feature