console-listener

Crates.ioconsole-listener
lib.rsconsole-listener
version0.2.0
sourcesrc
created_at2021-01-21 09:11:11.917591
updated_at2021-01-23 10:51:25.484968
descriptionA crate for listening to console input in a separate thread.
homepage
repository
max_upload_size
id344802
size6,626
(Arto-O)

documentation

README

NOTE: Use console_listener with an underscore instead of the dash to bring this crate into scope.

console-listener

console-listener is a crate for listening to console input in a separate thread. It is very useful for listen for a stop command in an otherwise infinitely looping program. console_listener includes the Listener struct, used to listen for a specified string to be typed to the console.

How to use it

Use console_listener::listener::Listener to bring the struct to scope. Use Listener::new(key: &str) to create a new Listener instance. See whether the specified string has been heard using heard_key() Check the documentation for more info on the implementations.

Notes

This crate is still in initial development so the public API might still change drastically.

Commit count: 0

cargo fmt