Skip to main content

Driver

Trait Driver 

Source
pub trait Driver<Q, A>
where for<'a> Self: Read<&'a mut [A], Output = &'a A>,
{ // Required methods fn current_position(&self) -> usize; fn current_state(&self) -> State<&Q>; }
Expand description

The Driver is the basis for all compatible actors within the system. Each implementation is required to define the type of internal store it will use to manage its data. This abstraction allows for flexibility in the choice of data structures, enabling the actor to adapt to various use cases and performance requirements.

Required Methods§

Source

fn current_position(&self) -> usize

returns the current position of the driver.

Source

fn current_state(&self) -> State<&Q>

returns a view of the current state of the driver.

Implementors§

Source§

impl<Q, A> Driver<Q, A> for Head<Q, usize>
where Q: RawState, for<'a> Self: Read<&'a mut [A], Output = &'a A>,