MCPcopy Index your code
hub / github.com/endbasic/endbasic / safe_try_send

Method safe_try_send

web/src/input.rs:84–88  ·  view source on GitHub ↗

Wrapper around `self.on_key_tx.try_send` that always expects to succeed.

(&self, key: Key)

Source from the content-addressed store, hash-verified

82impl OnScreenKeyboard {
83 /// Wrapper around `self.on_key_tx.try_send` that always expects to succeed.
84 fn safe_try_send(&self, key: Key) {
85 if let Err(e) = self.on_key_tx.try_send(key) {
86 log_and_panic!("Send to unbounded channel must succeed: {}", e);
87 }
88 }
89
90 /// Pushes a new captured `dom_event` input event into the input.
91 pub fn inject_input_event(&self, dom_event: InputEvent) {

Callers 7

inject_input_eventMethod · 0.80
inject_keyboard_eventMethod · 0.80
press_escapeMethod · 0.80
press_arrow_upMethod · 0.80
press_arrow_downMethod · 0.80
press_arrow_leftMethod · 0.80
press_arrow_rightMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected