Struct pftables_rs::PfTable[][src]

pub struct PfTable {
    pub name: String,
}

A high-level struct representing a pf table containing addresses

Fields

name: String

Implementations

impl PfTable[src]

pub fn new(name: &str) -> PfTable[src]

Prepares a new PfTable with a provided name

pub fn get_addrs(&self, fd: &File) -> Result<Vec<PfrAddr>, PfError>[src]

Asks the kernel for a list of addresses in the table

pub fn add_addrs(&self, fd: &File, addrs: Vec<PfrAddr>) -> Result<(), PfError>[src]

Asks the kernel to add a list of addresses to the table

pub fn del_addrs(&self, fd: &File, addrs: Vec<PfrAddr>) -> Result<(), PfError>[src]

Asks the kernel to delete a list of addresses from the table

pub fn clr_addrs(&self, fd: &File) -> Result<(), PfError>[src]

Asks the kernel to remove every address from the table

Trait Implementations

impl Clone for PfTable[src]

impl Debug for PfTable[src]

Auto Trait Implementations

impl RefUnwindSafe for PfTable

impl Send for PfTable

impl Sync for PfTable

impl Unpin for PfTable

impl UnwindSafe for PfTable

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.