pub struct Ipfw { /* private fields */ }Expand description
The crates main, public instance which should be used by the program.
Implementations§
Source§impl Ipfw
impl Ipfw
Sourcepub fn new() -> IpfwResult<Self>
pub fn new() -> IpfwResult<Self>
Creates new instance and opens the connection to the IPFW instance in kernel.
Sourcepub fn ipfw_table_handler<T>(
&self,
tablename: T,
cmd: IpfwCmd<'_>,
quite: bool,
) -> IpfwResult<i32>
pub fn ipfw_table_handler<T>( &self, tablename: T, cmd: IpfwCmd<'_>, quite: bool, ) -> IpfwResult<i32>
A commands over tables only.
§Arguments
-
tablename- a title of the table. -
cmd- a IpfwCmd command which is required to run. -
quite- do not output to stdout (unused).
§Returns
A Result is returned as type IpfwResult
-
Result::Ok - with the amount of the successfull operations.
-
Result::Err - an error description witht eh error code.
Auto Trait Implementations§
impl Freeze for Ipfw
impl RefUnwindSafe for Ipfw
impl Send for Ipfw
impl Sync for Ipfw
impl Unpin for Ipfw
impl UnwindSafe for Ipfw
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more