Skip to main content

Interface

Struct Interface 

Source
pub struct Interface<'a> { /* private fields */ }
Expand description

pfring version of an interface.

Implementations§

Source§

impl<'a> Interface<'a>

Source

pub fn new(name: &str, dll: &'a Container<PFRingDll>) -> Result<Self, Error>

Trait Implementations§

Source§

impl<'a> Drop for Interface<'a>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<'a> DynamicInterface<'a> for Interface<'a>

Source§

fn send(&self, packet: &[u8]) -> Result<(), Error>

Sends a raw packet.
Source§

fn receive(&mut self) -> Result<BorrowedPacket<'_>, Error>

Receives a raw packet.
Source§

fn flush(&self)

Flushes a queue
Provides information about the underlying technology used for this connection.
Source§

fn stats(&self) -> Result<Stats, Error>

Provides transmission statistics
Source§

fn break_loop(&self)

Breaks previously started loops.
Source§

fn loop_infinite_dyn( &self, callback: &dyn FnMut(&BorrowedPacket<'_>), ) -> Result<(), Error>

Runs infinite loop and passes received packets via callback. Read more
Source§

impl<'a> Send for Interface<'a>

Source§

impl<'a> StaticInterface<'a> for Interface<'a>

Source§

fn loop_infinite<F>(&self, callback: F) -> Result<(), Error>
where F: FnMut(&BorrowedPacket<'_>),

Runs infinite loop and passes received packets via callback. Read more
Source§

impl<'a> Sync for Interface<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Interface<'a>

§

impl<'a> RefUnwindSafe for Interface<'a>

§

impl<'a> Unpin for Interface<'a>

§

impl<'a> UnsafeUnpin for Interface<'a>

§

impl<'a> UnwindSafe for Interface<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.