Enum KeyCode

Source
#[repr(u32)]
pub enum KeyCode {
Show 195 variants Unknown = 0, Backquote = 1, Backslash = 2, BracketLeft = 3, BracketRight = 4, Comma = 5, Digit0 = 6, Digit1 = 7, Digit2 = 8, Digit3 = 9, Digit4 = 10, Digit5 = 11, Digit6 = 12, Digit7 = 13, Digit8 = 14, Digit9 = 15, Equal = 16, IntlBackslash = 17, IntlRo = 18, IntlYen = 19, KeyA = 20, KeyB = 21, KeyC = 22, KeyD = 23, KeyE = 24, KeyF = 25, KeyG = 26, KeyH = 27, KeyI = 28, KeyJ = 29, KeyK = 30, KeyL = 31, KeyM = 32, KeyN = 33, KeyO = 34, KeyP = 35, KeyQ = 36, KeyR = 37, KeyS = 38, KeyT = 39, KeyU = 40, KeyV = 41, KeyW = 42, KeyX = 43, KeyY = 44, KeyZ = 45, Minus = 46, Period = 47, Quote = 48, Semicolon = 49, Slash = 50, AltLeft = 51, AltRight = 52, Backspace = 53, CapsLock = 54, ContextMenu = 55, ControlLeft = 56, ControlRight = 57, Enter = 58, SuperLeft = 59, SuperRight = 60, ShiftLeft = 61, ShiftRight = 62, Space = 63, Tab = 64, Convert = 65, KanaMode = 66, Lang1 = 67, Lang2 = 68, Lang3 = 69, Lang4 = 70, Lang5 = 71, NonConvert = 72, Delete = 73, End = 74, Help = 75, Home = 76, Insert = 77, PageDown = 78, PageUp = 79, ArrowDown = 80, ArrowLeft = 81, ArrowRight = 82, ArrowUp = 83, NumLock = 84, Numpad0 = 85, Numpad1 = 86, Numpad2 = 87, Numpad3 = 88, Numpad4 = 89, Numpad5 = 90, Numpad6 = 91, Numpad7 = 92, Numpad8 = 93, Numpad9 = 94, NumpadAdd = 95, NumpadBackspace = 96, NumpadClear = 97, NumpadClearEntry = 98, NumpadComma = 99, NumpadDecimal = 100, NumpadDivide = 101, NumpadEnter = 102, NumpadEqual = 103, NumpadHash = 104, NumpadMemoryAdd = 105, NumpadMemoryClear = 106, NumpadMemoryRecall = 107, NumpadMemoryStore = 108, NumpadMemorySubtract = 109, NumpadMultiply = 110, NumpadParenLeft = 111, NumpadParenRight = 112, NumpadStar = 113, NumpadSubtract = 114, Escape = 115, Fn = 116, FnLock = 117, PrintScreen = 118, ScrollLock = 119, Pause = 120, BrowserBack = 121, BrowserFavorites = 122, BrowserForward = 123, BrowserHome = 124, BrowserRefresh = 125, BrowserSearch = 126, BrowserStop = 127, Eject = 128, LaunchApp1 = 129, LaunchApp2 = 130, LaunchMail = 131, MediaPlayPause = 132, MediaSelect = 133, MediaStop = 134, MediaTrackNext = 135, MediaTrackPrevious = 136, Power = 137, Sleep = 138, AudioVolumeDown = 139, AudioVolumeMute = 140, AudioVolumeUp = 141, WakeUp = 142, Meta = 143, Hyper = 144, Turbo = 145, Abort = 146, Resume = 147, Suspend = 148, Again = 149, Copy = 150, Cut = 151, Find = 152, Open = 153, Paste = 154, Props = 155, Select = 156, Undo = 157, Hiragana = 158, Katakana = 159, F1 = 160, F2 = 161, F3 = 162, F4 = 163, F5 = 164, F6 = 165, F7 = 166, F8 = 167, F9 = 168, F10 = 169, F11 = 170, F12 = 171, F13 = 172, F14 = 173, F15 = 174, F16 = 175, F17 = 176, F18 = 177, F19 = 178, F20 = 179, F21 = 180, F22 = 181, F23 = 182, F24 = 183, F25 = 184, F26 = 185, F27 = 186, F28 = 187, F29 = 188, F30 = 189, F31 = 190, F32 = 191, F33 = 192, F34 = 193, F35 = 194,
}
Expand description

Code of a key on keyboard. Shamelessly taken from winit source code to match their key codes with fyrox-ui’s.

Variants§

§

Unknown = 0

This variant is used when the key cannot be translated to any other variant.

§

Backquote = 1

` on a US keyboard. This is also called a backtick or grave. This is the 半角/全角/漢字 (hankaku/zenkaku/kanji) key on Japanese keyboards

§

Backslash = 2

Used for both the US \ (on the 101-key layout) and also for the key located between the and Enter keys on row C of the 102-, 104- and 106-key layouts. Labeled # on a UK (102) keyboard.

§

BracketLeft = 3

[ on a US keyboard.

§

BracketRight = 4

] on a US keyboard.

§

Comma = 5

, on a US keyboard.

§

Digit0 = 6

0 on a US keyboard.

§

Digit1 = 7

1 on a US keyboard.

§

Digit2 = 8

2 on a US keyboard.

§

Digit3 = 9

3 on a US keyboard.

§

Digit4 = 10

4 on a US keyboard.

§

Digit5 = 11

5 on a US keyboard.

§

Digit6 = 12

6 on a US keyboard.

§

Digit7 = 13

7 on a US keyboard.

§

Digit8 = 14

8 on a US keyboard.

§

Digit9 = 15

9 on a US keyboard.

§

Equal = 16

= on a US keyboard.

§

IntlBackslash = 17

Located between the left Shift and Z keys. Labeled \ on a UK keyboard.

§

IntlRo = 18

Located between the / and right Shift keys. Labeled \ (ro) on a Japanese keyboard.

§

IntlYen = 19

Located between the = and Backspace keys. Labeled ¥ (yen) on a Japanese keyboard. \ on a Russian keyboard.

§

KeyA = 20

a on a US keyboard. Labeled q on an AZERTY (e.g., French) keyboard.

§

KeyB = 21

b on a US keyboard.

§

KeyC = 22

c on a US keyboard.

§

KeyD = 23

d on a US keyboard.

§

KeyE = 24

e on a US keyboard.

§

KeyF = 25

f on a US keyboard.

§

KeyG = 26

g on a US keyboard.

§

KeyH = 27

h on a US keyboard.

§

KeyI = 28

i on a US keyboard.

§

KeyJ = 29

j on a US keyboard.

§

KeyK = 30

k on a US keyboard.

§

KeyL = 31

l on a US keyboard.

§

KeyM = 32

m on a US keyboard.

§

KeyN = 33

n on a US keyboard.

§

KeyO = 34

o on a US keyboard.

§

KeyP = 35

p on a US keyboard.

§

KeyQ = 36

q on a US keyboard. Labeled a on an AZERTY (e.g., French) keyboard.

§

KeyR = 37

r on a US keyboard.

§

KeyS = 38

s on a US keyboard.

§

KeyT = 39

t on a US keyboard.

§

KeyU = 40

u on a US keyboard.

§

KeyV = 41

v on a US keyboard.

§

KeyW = 42

w on a US keyboard. Labeled z on an AZERTY (e.g., French) keyboard.

§

KeyX = 43

x on a US keyboard.

§

KeyY = 44

y on a US keyboard. Labeled z on a QWERTZ (e.g., German) keyboard.

§

KeyZ = 45

z on a US keyboard. Labeled w on an AZERTY (e.g., French) keyboard, and y on a QWERTZ (e.g., German) keyboard.

§

Minus = 46

- on a US keyboard.

§

Period = 47

. on a US keyboard.

§

Quote = 48

on a US keyboard.

§

Semicolon = 49

; on a US keyboard.

§

Slash = 50

/ on a US keyboard.

§

AltLeft = 51

Alt, Option, or .

§

AltRight = 52

Alt, Option, or . This is labeled AltGr on many keyboard layouts.

§

Backspace = 53

Backspace or . Labeled Delete on Apple keyboards.

§

CapsLock = 54

CapsLock or

§

ContextMenu = 55

The application context menu key, which is typically found between the right Super key and the right Control key.

§

ControlLeft = 56

Control or

§

ControlRight = 57

Control or

§

Enter = 58

Enter or . Labeled Return on Apple keyboards.

§

SuperLeft = 59

The Windows, , Command, or other OS symbol key.

§

SuperRight = 60

The Windows, , Command, or other OS symbol key.

§

ShiftLeft = 61

Shift or

§

ShiftRight = 62

Shift or

§

Space = 63

  (space)

§

Tab = 64

Tab or

§

Convert = 65

Japanese: (henkan)

§

KanaMode = 66

Japanese: カタカナ/ひらがな/ローマ字 (katakana/hiragana/romaji)

§

Lang1 = 67

Korean: HangulMode 한/영 (han/yeong)

Japanese (Mac keyboard): (kana)

§

Lang2 = 68

Korean: Hanja (hanja)

Japanese (Mac keyboard): (eisu)

§

Lang3 = 69

Japanese (word-processing keyboard): Katakana

§

Lang4 = 70

Japanese (word-processing keyboard): Hiragana

§

Lang5 = 71

Japanese (word-processing keyboard): Zenkaku/Hankaku

§

NonConvert = 72

Japanese: 無変換 (muhenkan)

§

Delete = 73

. The forward delete key. Note that on Apple keyboards, the key labelled Delete on the main part of the keyboard is encoded as Backspace.

§

End = 74

Page Down, End, or

§

Help = 75

Help. Not present on standard PC keyboards.

§

Home = 76

Home or

§

Insert = 77

Insert or Ins. Not present on Apple keyboards.

§

PageDown = 78

Page Down, PgDn, or

§

PageUp = 79

Page Up, PgUp, or

§

ArrowDown = 80

§

ArrowLeft = 81

§

ArrowRight = 82

§

ArrowUp = 83

§

NumLock = 84

On the Mac, this is used for the numpad Clear key.

§

Numpad0 = 85

0 Ins on a keyboard. 0 on a phone or remote control

§

Numpad1 = 86

1 End on a keyboard. 1 or 1 QZ on a phone or remote control

§

Numpad2 = 87

2 ↓ on a keyboard. 2 ABC on a phone or remote control

§

Numpad3 = 88

3 PgDn on a keyboard. 3 DEF on a phone or remote control

§

Numpad4 = 89

4 ← on a keyboard. 4 GHI on a phone or remote control

§

Numpad5 = 90

5 on a keyboard. 5 JKL on a phone or remote control

§

Numpad6 = 91

6 → on a keyboard. 6 MNO on a phone or remote control

§

Numpad7 = 92

7 Home on a keyboard. 7 PQRS or 7 PRS on a phone or remote control

§

Numpad8 = 93

8 ↑ on a keyboard. 8 TUV on a phone or remote control

§

Numpad9 = 94

9 PgUp on a keyboard. 9 WXYZ or 9 WXY on a phone or remote control

§

NumpadAdd = 95

+

§

NumpadBackspace = 96

Found on the Microsoft Natural Keyboard.

§

NumpadClear = 97

C or A (All Clear). Also for use with numpads that have a Clear key that is separate from the NumLock key. On the Mac, the numpad Clear key is encoded as NumLock.

§

NumpadClearEntry = 98

C (Clear Entry)

§

NumpadComma = 99

, (thousands separator). For locales where the thousands separator is a “.” (e.g., Brazil), this key may generate a ..

§

NumpadDecimal = 100

. Del. For locales where the decimal separator is “,” (e.g., Brazil), this key may generate a ,.

§

NumpadDivide = 101

/

§

NumpadEnter = 102

§

NumpadEqual = 103

=

§

NumpadHash = 104

# on a phone or remote control device. This key is typically found below the 9 key and to the right of the 0 key.

§

NumpadMemoryAdd = 105

M Add current entry to the value stored in memory.

§

NumpadMemoryClear = 106

M Clear the value stored in memory.

§

NumpadMemoryRecall = 107

M Replace the current entry with the value stored in memory.

§

NumpadMemoryStore = 108

M Replace the value stored in memory with the current entry.

§

NumpadMemorySubtract = 109

M Subtract current entry from the value stored in memory.

§

NumpadMultiply = 110

on a keyboard. For use with numpads that provide mathematical operations (+, - and /).

Use NumpadStar for the * key on phones and remote controls.

§

NumpadParenLeft = 111

( Found on the Microsoft Natural Keyboard.

§

NumpadParenRight = 112

) Found on the Microsoft Natural Keyboard.

§

NumpadStar = 113

* on a phone or remote control device.

This key is typically found below the 7 key and to the left of the 0 key.

Use “NumpadMultiply” for the * key on numeric keypads.

§

NumpadSubtract = 114

-

§

Escape = 115

Esc or

§

Fn = 116

Fn This is typically a hardware key that does not generate a separate code.

§

FnLock = 117

FLock or FnLock. Function Lock key. Found on the Microsoft Natural Keyboard.

§

PrintScreen = 118

PrtScr SysRq or Print Screen

§

ScrollLock = 119

Scroll Lock

§

Pause = 120

Pause Break

§

BrowserBack = 121

Some laptops place this key to the left of the key.

This also the “back” button (triangle) on Android.

§

BrowserFavorites = 122

§

BrowserForward = 123

Some laptops place this key to the right of the key.

§

BrowserHome = 124

The “home” button on Android.

§

BrowserRefresh = 125

§

BrowserSearch = 126

§

BrowserStop = 127

§

Eject = 128

Eject or . This key is placed in the function section on some Apple keyboards.

§

LaunchApp1 = 129

Sometimes labelled My Computer on the keyboard

§

LaunchApp2 = 130

Sometimes labelled Calculator on the keyboard

§

LaunchMail = 131

§

MediaPlayPause = 132

§

MediaSelect = 133

§

MediaStop = 134

§

MediaTrackNext = 135

§

MediaTrackPrevious = 136

§

Power = 137

This key is placed in the function section on some Apple keyboards, replacing the Eject key.

§

Sleep = 138

§

AudioVolumeDown = 139

§

AudioVolumeMute = 140

§

AudioVolumeUp = 141

§

WakeUp = 142

§

Meta = 143

§

Hyper = 144

§

Turbo = 145

§

Abort = 146

§

Resume = 147

§

Suspend = 148

§

Again = 149

Found on Sun’s USB keyboard.

§

Copy = 150

Found on Sun’s USB keyboard.

§

Cut = 151

Found on Sun’s USB keyboard.

§

Find = 152

Found on Sun’s USB keyboard.

§

Open = 153

Found on Sun’s USB keyboard.

§

Paste = 154

Found on Sun’s USB keyboard.

§

Props = 155

Found on Sun’s USB keyboard.

§

Select = 156

Found on Sun’s USB keyboard.

§

Undo = 157

Found on Sun’s USB keyboard.

§

Hiragana = 158

Use for dedicated ひらがな key found on some Japanese word processing keyboards.

§

Katakana = 159

Use for dedicated カタカナ key found on some Japanese word processing keyboards.

§

F1 = 160

General-purpose function key. Usually found at the top of the keyboard.

§

F2 = 161

General-purpose function key. Usually found at the top of the keyboard.

§

F3 = 162

General-purpose function key. Usually found at the top of the keyboard.

§

F4 = 163

General-purpose function key. Usually found at the top of the keyboard.

§

F5 = 164

General-purpose function key. Usually found at the top of the keyboard.

§

F6 = 165

General-purpose function key. Usually found at the top of the keyboard.

§

F7 = 166

General-purpose function key. Usually found at the top of the keyboard.

§

F8 = 167

General-purpose function key. Usually found at the top of the keyboard.

§

F9 = 168

General-purpose function key. Usually found at the top of the keyboard.

§

F10 = 169

General-purpose function key. Usually found at the top of the keyboard.

§

F11 = 170

General-purpose function key. Usually found at the top of the keyboard.

§

F12 = 171

General-purpose function key. Usually found at the top of the keyboard.

§

F13 = 172

General-purpose function key. Usually found at the top of the keyboard.

§

F14 = 173

General-purpose function key. Usually found at the top of the keyboard.

§

F15 = 174

General-purpose function key. Usually found at the top of the keyboard.

§

F16 = 175

General-purpose function key. Usually found at the top of the keyboard.

§

F17 = 176

General-purpose function key. Usually found at the top of the keyboard.

§

F18 = 177

General-purpose function key. Usually found at the top of the keyboard.

§

F19 = 178

General-purpose function key. Usually found at the top of the keyboard.

§

F20 = 179

General-purpose function key. Usually found at the top of the keyboard.

§

F21 = 180

General-purpose function key. Usually found at the top of the keyboard.

§

F22 = 181

General-purpose function key. Usually found at the top of the keyboard.

§

F23 = 182

General-purpose function key. Usually found at the top of the keyboard.

§

F24 = 183

General-purpose function key. Usually found at the top of the keyboard.

§

F25 = 184

General-purpose function key.

§

F26 = 185

General-purpose function key.

§

F27 = 186

General-purpose function key.

§

F28 = 187

General-purpose function key.

§

F29 = 188

General-purpose function key.

§

F30 = 189

General-purpose function key.

§

F31 = 190

General-purpose function key.

§

F32 = 191

General-purpose function key.

§

F33 = 192

General-purpose function key.

§

F34 = 193

General-purpose function key.

§

F35 = 194

General-purpose function key.

Trait Implementations§

Source§

impl AsRef<str> for KeyCode

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for KeyCode

Source§

fn clone(&self) -> KeyCode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for KeyCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for KeyCode

Source§

fn default() -> KeyCode

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for KeyCode

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<KeyCode, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl FromStr for KeyCode

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<KeyCode, <KeyCode as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for KeyCode

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for KeyCode

Source§

fn cmp(&self, other: &KeyCode) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq<KeyCode> for KeyBinding

Source§

fn eq(&self, other: &KeyCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialEq for KeyCode

Source§

fn eq(&self, other: &KeyCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for KeyCode

Source§

fn partial_cmp(&self, other: &KeyCode) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Reflect for KeyCode
where KeyCode: 'static,

Source§

fn source_path() -> &'static str

Source§

fn type_name(&self) -> &'static str

Source§

fn doc(&self) -> &'static str

Source§

fn assembly_name(&self) -> &'static str

Returns a parent assembly name of the type that implements this trait. WARNING: You should use proc-macro (#[derive(Reflect)]) to ensure that this method will return correct assembly name. In other words - there’s no guarantee, that any implementation other than proc-macro will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME") as an implementation.
Source§

fn type_assembly_name() -> &'static str

Returns a parent assembly name of the type that implements this trait. WARNING: You should use proc-macro (#[derive(Reflect)]) to ensure that this method will return correct assembly name. In other words - there’s no guarantee, that any implementation other than proc-macro will return a correct name of the assembly. Alternatively, you can use env!("CARGO_PKG_NAME") as an implementation.
Source§

fn fields_info(&self, func: &mut dyn FnMut(&[FieldInfo<'_, '_>]))

Source§

fn into_any(self: Box<KeyCode>) -> Box<dyn Any>

Source§

fn set( &mut self, value: Box<dyn Reflect>, ) -> Result<Box<dyn Reflect>, Box<dyn Reflect>>

Source§

fn as_any(&self, func: &mut dyn FnMut(&(dyn Any + 'static)))

Source§

fn as_any_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Any + 'static)))

Source§

fn as_reflect(&self, func: &mut dyn FnMut(&(dyn Reflect + 'static)))

Source§

fn as_reflect_mut(&mut self, func: &mut dyn FnMut(&mut (dyn Reflect + 'static)))

Source§

fn fields(&self, func: &mut dyn FnMut(&[&(dyn Reflect + 'static)]))

Source§

fn fields_mut( &mut self, func: &mut dyn FnMut(&mut [&mut (dyn Reflect + 'static)]), )

Source§

fn field( &self, name: &str, func: &mut dyn FnMut(Option<&(dyn Reflect + 'static)>), )

Source§

fn field_mut( &mut self, name: &str, func: &mut dyn FnMut(Option<&mut (dyn Reflect + 'static)>), )

Source§

fn set_field( &mut self, field: &str, value: Box<dyn Reflect>, func: &mut dyn FnMut(Result<Box<dyn Reflect>, Box<dyn Reflect>>), )

Calls user method specified with #[reflect(setter = ..)] or falls back to Reflect::field_mut
Source§

fn as_array(&self, func: &mut dyn FnMut(Option<&(dyn ReflectArray + 'static)>))

Source§

fn as_array_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectArray + 'static)>), )

Source§

fn as_list(&self, func: &mut dyn FnMut(Option<&(dyn ReflectList + 'static)>))

Source§

fn as_list_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectList + 'static)>), )

Source§

fn as_inheritable_variable( &self, func: &mut dyn FnMut(Option<&(dyn ReflectInheritableVariable + 'static)>), )

Source§

fn as_inheritable_variable_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectInheritableVariable + 'static)>), )

Source§

fn as_hash_map( &self, func: &mut dyn FnMut(Option<&(dyn ReflectHashMap + 'static)>), )

Source§

fn as_hash_map_mut( &mut self, func: &mut dyn FnMut(Option<&mut (dyn ReflectHashMap + 'static)>), )

Source§

impl Serialize for KeyCode

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<&str> for KeyCode

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<KeyCode, <KeyCode as TryFrom<&str>>::Error>

Performs the conversion.
Source§

impl VariantNames for KeyCode

Source§

const VARIANTS: &'static [&'static str]

Names of the variants of this enum
Source§

impl Visit for KeyCode

Source§

fn visit(&mut self, name: &str, visitor: &mut Visitor) -> Result<(), VisitError>

Read or write this value, depending on whether Visitor::is_reading() is true or false. Read more
Source§

impl Copy for KeyCode

Source§

impl Eq for KeyCode

Source§

impl StructuralPartialEq for KeyCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsyncTaskResult for T
where T: Any + Send + 'static,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts self reference as a reference to Any. Could be used to downcast a trait object to a particular type.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts self reference as a reference to Any. Could be used to downcast a trait object to a particular type.
Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> FieldValue for T
where T: 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Casts self to a &dyn Any
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<R> GetField for R
where R: Reflect,

Source§

fn get_field<T>(&self, name: &str, func: &mut dyn FnMut(Option<&T>))
where T: 'static,

Source§

fn get_field_mut<T>(&mut self, name: &str, func: &mut dyn FnMut(Option<&mut T>))
where T: 'static,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> MessageData for T
where T: 'static + Debug + PartialEq + Any + Send + Clone,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Casts self as Any reference.
Source§

fn compare(&self, other: &(dyn MessageData + 'static)) -> bool

Compares this message data with some other.
Source§

fn clone_box(&self) -> Box<dyn MessageData>

Clones self as boxed value.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> ReflectBase for T
where T: Reflect,

Source§

fn as_any_raw(&self) -> &(dyn Any + 'static)

Source§

fn as_any_raw_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

impl<T> ResolvePath for T
where T: Reflect,

Source§

fn resolve_path<'p>( &self, path: &'p str, func: &mut dyn FnMut(Result<&(dyn Reflect + 'static), ReflectPathError<'p>>), )

Source§

fn resolve_path_mut<'p>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>), )

Source§

fn get_resolve_path<'p, T>( &self, path: &'p str, func: &mut dyn FnMut(Result<&T, ReflectPathError<'p>>), )
where T: Reflect,

Source§

fn get_resolve_path_mut<'p, T>( &mut self, path: &'p str, func: &mut dyn FnMut(Result<&mut T, ReflectPathError<'p>>), )
where T: Reflect,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ScriptMessagePayload for T
where T: 'static + Send + Debug,

Source§

fn as_any_ref(&self) -> &(dyn Any + 'static)

Returns self as &dyn Any
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Returns self as &dyn Any
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Value for T
where T: Reflect + Clone + Debug + Send,

Source§

fn clone_box(&self) -> Box<dyn Value>

Source§

fn into_box_reflect(self: Box<T>) -> Box<dyn Reflect>

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ResourceLoadError for T
where T: 'static + Debug + Send + Sync,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<T> SpriteSheetTexture for T
where T: PartialEq + Clone + Visit + Reflect + 'static,