pub trait Helper {
// Required methods
fn apply_ruleset_raw<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>(
payload: String,
program: Option<&P>,
args: I,
) -> impl Future<Output = Result<(), NftablesError>> + Send;
fn get_current_ruleset_raw<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>(
program: Option<&P>,
args: I,
) -> impl Future<Output = Result<String, NftablesError>> + Send;
// Provided methods
fn apply_ruleset(
nftables: &Nftables<'_>,
) -> impl Future<Output = Result<(), NftablesError>> + Send { ... }
fn apply_ruleset_with_args<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>(
nftables: &Nftables<'_>,
program: Option<&P>,
args: I,
) -> impl Future<Output = Result<(), NftablesError>> + Send { ... }
fn get_current_ruleset( ) -> impl Future<Output = Result<Nftables<'static>, NftablesError>> + Send { ... }
fn get_current_ruleset_with_args<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>(
program: Option<&P>,
args: I,
) -> impl Future<Output = Result<Nftables<'static>, NftablesError>> + Send { ... }
}
Expand description
Required Methods§
Sourcefn apply_ruleset_raw<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>(
payload: String,
program: Option<&P>,
args: I,
) -> impl Future<Output = Result<(), NftablesError>> + Send
fn apply_ruleset_raw<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>( payload: String, program: Option<&P>, args: I, ) -> impl Future<Output = Result<(), NftablesError>> + Send
Apply a ruleset consisting of an untyped String payload with, optionally, a custom “nft” program and extra arguments.
Sourcefn get_current_ruleset_raw<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>(
program: Option<&P>,
args: I,
) -> impl Future<Output = Result<String, NftablesError>> + Send
fn get_current_ruleset_raw<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>( program: Option<&P>, args: I, ) -> impl Future<Output = Result<String, NftablesError>> + Send
Get the current ruleset as an untyped String payload with, optionally, a custom “nft” program and extra arguments.
Provided Methods§
Sourcefn apply_ruleset(
nftables: &Nftables<'_>,
) -> impl Future<Output = Result<(), NftablesError>> + Send
fn apply_ruleset( nftables: &Nftables<'_>, ) -> impl Future<Output = Result<(), NftablesError>> + Send
Apply a Nftables ruleset.
Sourcefn apply_ruleset_with_args<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>(
nftables: &Nftables<'_>,
program: Option<&P>,
args: I,
) -> impl Future<Output = Result<(), NftablesError>> + Send
fn apply_ruleset_with_args<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>( nftables: &Nftables<'_>, program: Option<&P>, args: I, ) -> impl Future<Output = Result<(), NftablesError>> + Send
Apply a Nftables ruleset with, optionally, a custom “nft” program and extra arguments.
Sourcefn get_current_ruleset() -> impl Future<Output = Result<Nftables<'static>, NftablesError>> + Send
fn get_current_ruleset() -> impl Future<Output = Result<Nftables<'static>, NftablesError>> + Send
Get the current Nftables ruleset.
Sourcefn get_current_ruleset_with_args<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>(
program: Option<&P>,
args: I,
) -> impl Future<Output = Result<Nftables<'static>, NftablesError>> + Send
fn get_current_ruleset_with_args<'a, P: AsRef<OsStr> + Sync + ?Sized, A: AsRef<OsStr> + Sync + ?Sized + 'a, I: IntoIterator<Item = &'a A> + Send>( program: Option<&P>, args: I, ) -> impl Future<Output = Result<Nftables<'static>, NftablesError>> + Send
Get the current Nftables ruleset with, optionally, a custom “nft” program and extra arguments.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.