Struct rtlola_input_plugins::pcap_plugin::PcapEventSource
source · pub struct PcapEventSource<InputTime: TimeRepresentation> { /* private fields */ }
Expand description
Parses events from network packets.
Implementations§
source§impl<InputTime: TimeRepresentation> PcapEventSource<InputTime>
impl<InputTime: TimeRepresentation> PcapEventSource<InputTime>
pub fn setup( src: &PcapInputSource, ) -> Result<PcapEventSource<InputTime>, PcapError>
Trait Implementations§
source§impl<InputTime: TimeRepresentation> EventSource<InputTime> for PcapEventSource<InputTime>
impl<InputTime: TimeRepresentation> EventSource<InputTime> for PcapEventSource<InputTime>
type Error = PcapError
type Rec = PcapRecord
source§fn init_data(&self) -> Result<IpNetwork, PcapError>
fn init_data(&self) -> Result<IpNetwork, PcapError>
Return the data needed by the monitor to initialize the input source.
source§fn next_event(
&mut self,
) -> Result<Option<(PcapRecord, InputTime::InnerTime)>, PcapError>
fn next_event( &mut self, ) -> Result<Option<(PcapRecord, InputTime::InnerTime)>, PcapError>
Queries the event source for a new Record(Event) in a blocking fashion.
If there are no more records, None is returned.
Auto Trait Implementations§
impl<InputTime> Freeze for PcapEventSource<InputTime>
impl<InputTime> !RefUnwindSafe for PcapEventSource<InputTime>
impl<InputTime> Send for PcapEventSource<InputTime>
impl<InputTime> !Sync for PcapEventSource<InputTime>
impl<InputTime> !Unpin for PcapEventSource<InputTime>
impl<InputTime> !UnwindSafe for PcapEventSource<InputTime>
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more