[−][src]Trait rawsock::traits::StaticInterface
Contains static part of the interface trait.
Template functions cannot be used for dynamic dispatch (&dyn) and it was necessary to split the interface trait into two parts - static and dynamic, depending how user uses the trait. StaticInterface contains only the part of trait that cannot be used in the dynamic way.
Required methods
fn loop_infinite<F>(&self, callback: F) -> Result<(), Error> where
F: FnMut(&BorrowedPacket),
F: FnMut(&BorrowedPacket),
Runs infinite loop and passes received packets via callback.
Exits when the break_loop() function is called or on error.
Implementors
impl<'a> StaticInterface<'a> for rawsock::pcap::Interface<'a>
[src]
fn loop_infinite<F>(&self, callback: F) -> Result<(), Error> where
F: FnMut(&BorrowedPacket),
[src]
F: FnMut(&BorrowedPacket),
impl<'a> StaticInterface<'a> for rawsock::pfring::Interface<'a>
[src]
fn loop_infinite<F>(&self, callback: F) -> Result<(), Error> where
F: FnMut(&BorrowedPacket),
[src]
F: FnMut(&BorrowedPacket),
impl<'a> StaticInterface<'a> for rawsock::wpcap::Interface<'a>
[src]
fn loop_infinite<F>(&self, callback: F) -> Result<(), Error> where
F: FnMut(&BorrowedPacket),
[src]
F: FnMut(&BorrowedPacket),