Creates a new `BEEP` command that reproduces a canned tone on the `console`.
(console: Rc<RefCell<dyn Console>>)
| 43 | impl BeepCommand { |
| 44 | /// Creates a new `BEEP` command that reproduces a canned tone on the `console`. |
| 45 | pub fn new(console: Rc<RefCell<dyn Console>>) -> Rc<Self> { |
| 46 | Rc::from(Self { |
| 47 | metadata: CallableMetadataBuilder::new("BEEP") |
| 48 | .with_async(true) |
| 49 | .with_syntax(&[(&[], None)]) |
| 50 | .with_category(CATEGORY) |
| 51 | .with_description( |
| 52 | "Reproduces a short audible tone. |
| 53 | This command plays a square-wave tone at 800 hertz for 0.25 seconds in consoles that \ |
| 54 | support sound. Otherwise, this falls back to a BEL control code that should match this \ |
| 55 | pitch and duration, but it may not.", |
| 56 | ) |
| 57 | .build(), |
| 58 | console, |
| 59 | }) |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | #[async_trait(?Send)] |
nothing calls this directly
no test coverage detected