pub struct Controller<'a> { /* private fields */ }
Expand description
The main driver to perform matching.
This includes processing datastreams, monitoring, and matching. The main
influence on the controller is from the Configuration
scheme.
Implementations§
Source§impl<'a> Controller<'a>
impl<'a> Controller<'a>
Sourcepub fn new(
config: &'a Configuration<'_>,
callback: Option<fn(&[Frame], &Configuration<'_>) -> Result<(), Box<dyn Error>>>,
) -> Self
pub fn new( config: &'a Configuration<'_>, callback: Option<fn(&[Frame], &Configuration<'_>) -> Result<(), Box<dyn Error>>>, ) -> Self
Create new Controller
with associated Configuration
.
Sourcepub fn run(&self, datastream: DataStream) -> Result<(), Box<dyn Error>>
pub fn run(&self, datastream: DataStream) -> Result<(), Box<dyn Error>>
Entrypoint to execute the Controller
.
The DataStream
only needs to be supplied. This allows the same
Controller
to be reused for differing streams without creating a new
one for each run, accordingly.
Auto Trait Implementations§
impl<'a> Freeze for Controller<'a>
impl<'a> RefUnwindSafe for Controller<'a>
impl<'a> Send for Controller<'a>
impl<'a> Sync for Controller<'a>
impl<'a> Unpin for Controller<'a>
impl<'a> UnwindSafe for Controller<'a>
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