1use little_kitty::*;
2
3fn main() {
4 println!("Kitty supported: {}", Command::is_supported().expect("is_supported"));
5
6 let response = Command::default()
9 .with_control('a', 'q')
11 .with_control('i', 1)
13 .with_expect_response()
14 .execute()
15 .expect("execute")
16 .expect("response");
17
18 if response.is_ok() {
19 println!("OK!");
20 }
21
22 let response = Command::default()
25 .with_control('i', 1)
27 .with_control('t', 's')
29 .with_expect_response()
30 .execute_with_payload(b"not a shared memory object")
31 .expect("execute_with_payload")
32 .expect("response");
33
34 println!("Error: {}", response.message.expect("message"));
35}