Struct retina_core::Runtime
source · pub struct Runtime<S>where
S: Subscribable,{ /* private fields */ }
Expand description
The Retina runtime.
The runtime initializes the DPDK environment abstraction layer, creates memory pools, launches the packet processing cores, and manages logging and display output.
Implementations§
source§impl<S> Runtime<S>where
S: Subscribable,
impl<S> Runtime<S>where
S: Subscribable,
sourcepub fn new(
config: RuntimeConfig,
factory: fn() -> FilterFactory<S::Tracked>,
) -> Result<Self>
pub fn new( config: RuntimeConfig, factory: fn() -> FilterFactory<S::Tracked>, ) -> Result<Self>
Creates a new runtime from the config
settings, filter, and callback.
§Remarks
The factory
parameter is a macro-generated function pointer based on the user-defined
filter string, and must take the value “filter
”. cb
is the name of the user-defined
callback function.
§Example
let mut runtime = Runtime::new(config, filter, callback)?;
Auto Trait Implementations§
impl<S> Freeze for Runtime<S>
impl<S> RefUnwindSafe for Runtime<S>
impl<S> !Send for Runtime<S>
impl<S> !Sync for Runtime<S>
impl<S> Unpin for Runtime<S>
impl<S> UnwindSafe for Runtime<S>
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