1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use arci::{Speaker, WaitFuture};

#[derive(Debug)]
pub struct PrintSpeaker {}

impl PrintSpeaker {
    pub fn new() -> Self {
        Self {}
    }
}

impl Default for PrintSpeaker {
    fn default() -> Self {
        PrintSpeaker::new()
    }
}

impl Speaker for PrintSpeaker {
    fn speak(&self, message: &str) -> Result<WaitFuture, arci::Error> {
        println!("PrintSpeaker: {message}");
        Ok(WaitFuture::ready())
    }
}