Struct pftables_rs::PfTable [−][src]
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,