pub struct Autorepeater { /* private fields */ }
Expand description
Maintains the internal autorepeat state.
The autorepeat tracks key presses and generates autorepeat key events for the keys that are eligible for autorepeat.
Implementations§
Source§impl Autorepeater
impl Autorepeater
Sourcepub fn new(
source: UnboundedReceiver<InputEvent>,
input_handlers_node: &Node,
metrics_logger: MetricsLogger,
) -> Rc<Self>
pub fn new( source: UnboundedReceiver<InputEvent>, input_handlers_node: &Node, metrics_logger: MetricsLogger, ) -> Rc<Self>
Creates a new Autorepeater. The source
is a receiver end through which
the input pipeline events are sent. You must submit Autorepeater::run
to an executor to start the event processing.
Sourcepub async fn run(
self: &Rc<Self>,
output: UnboundedSender<InputEvent>,
) -> Result<()>
pub async fn run( self: &Rc<Self>, output: UnboundedSender<InputEvent>, ) -> Result<()>
Run this function in an executor to start processing events. The
transformed event stream is available in output
.
pub fn set_handler_healthy(self: Rc<Self>)
pub fn set_handler_unhealthy(self: Rc<Self>, msg: &str)
Auto Trait Implementations§
impl !Freeze for Autorepeater
impl !RefUnwindSafe for Autorepeater
impl !Send for Autorepeater
impl !Sync for Autorepeater
impl Unpin for Autorepeater
impl !UnwindSafe for Autorepeater
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