pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
Sourcepub async fn new(address: Option<BDAddr>) -> Result<Self, Box<dyn Error>>
pub async fn new(address: Option<BDAddr>) -> Result<Self, Box<dyn Error>>
Examples found in repository?
examples/example.rs (line 29)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Sourcepub async fn run(&mut self)
pub async fn run(&mut self)
Examples found in repository?
examples/example.rs (line 30)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Sourcepub async fn register_air_gesture_events(&self, listener: fn(Uuid, AirGestures))
pub async fn register_air_gesture_events(&self, listener: fn(Uuid, AirGestures))
Examples found in repository?
examples/example.rs (line 32)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Sourcepub async fn register_tap_events(&self, listener: fn(Uuid, u8))
pub async fn register_tap_events(&self, listener: fn(Uuid, u8))
Examples found in repository?
examples/example.rs (line 33)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Sourcepub async fn register_raw_data_events(&self, listener: fn(Uuid, Vec<u8>))
pub async fn register_raw_data_events(&self, listener: fn(Uuid, Vec<u8>))
Examples found in repository?
examples/example.rs (line 34)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Sourcepub async fn register_mouse_events(&self, listener: fn(Uuid, i16, i16, bool))
pub async fn register_mouse_events(&self, listener: fn(Uuid, i16, i16, bool))
Examples found in repository?
examples/example.rs (line 35)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Sourcepub async fn register_air_gesture_state_events(&self, listener: fn(Uuid, bool))
pub async fn register_air_gesture_state_events(&self, listener: fn(Uuid, bool))
Examples found in repository?
examples/example.rs (line 36)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Sourcepub async fn set_input_mode(
&mut self,
mode: InputMode,
sensitivity: Option<Vec<u8>>,
)
pub async fn set_input_mode( &mut self, mode: InputMode, sensitivity: Option<Vec<u8>>, )
Examples found in repository?
examples/example.rs (line 39)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Sourcepub async fn set_input_type(&mut self, input_type: InputType)
pub async fn set_input_type(&mut self, input_type: InputType)
Examples found in repository?
examples/example.rs (line 43)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
pub async fn set_mouse_mode(&self, mouse_mode: MouseModes)
Sourcepub async fn send_vibration_sequence(&self, sequence: Vec<u16>)
pub async fn send_vibration_sequence(&self, sequence: Vec<u16>)
Examples found in repository?
examples/example.rs (line 63)
28async fn main() {
29 let mut tap_client = tap_sdk::Client::new(None).await.unwrap();
30 tap_client.run().await;
31
32 tap_client.register_air_gesture_events(on_gesture).await;
33 tap_client.register_tap_events(on_tapped).await;
34 tap_client.register_raw_data_events(on_raw_data).await;
35 tap_client.register_mouse_events(on_moused).await;
36 tap_client.register_air_gesture_state_events(on_mouse_mode_change).await;
37
38 println!("Setting Controller Mode for 5 seconds...");
39 tap_client.set_input_mode(InputMode::Controller, None).await;
40 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
41
42 println!("Setting Auto Mode for 5 seconds...");
43 tap_client.set_input_type(InputType::Auto).await;
44 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
45
46 println!("Setting forced Mouse Mode for 5 seconds...");
47 tap_client.set_input_type(InputType::Mouse).await;
48 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
49
50 println!("Setting forced Keyboard Mode for 5 seconds...");
51 tap_client.set_input_type(InputType::Keyboard).await;
52 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
53
54 println!("Setting Text Mode for 5 seconds...");
55 tap_client.set_input_mode(InputMode::Text, None).await;
56 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
57
58 println!("Setting Controller and Text Mode for 5 seconds...");
59 tap_client.set_input_mode(InputMode::ControllerText, None).await;
60 tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;
61
62 println!("Testing vibration feedback...");
63 tap_client.send_vibration_sequence(vec![100, 200, 100, 200, 500]).await;
64 tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
65
66 println!("Returning to Auto Mode for normal operation...");
67 tap_client.set_input_type(InputType::Auto).await;
68 tokio::time::sleep(tokio::time::Duration::from_secs(3)).await;
69
70 println!("Listening for events. Press Ctrl+C to exit.");
71 tokio::signal::ctrl_c().await.unwrap();
72}
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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