Enum bevy::input::keyboard::KeyCode

#[repr(u32)]
pub enum KeyCode {
Show 195 variants Unidentified(NativeKeyCode), Backquote, Backslash, BracketLeft, BracketRight, Comma, Digit0, Digit1, Digit2, Digit3, Digit4, Digit5, Digit6, Digit7, Digit8, Digit9, Equal, IntlBackslash, IntlRo, IntlYen, KeyA, KeyB, KeyC, KeyD, KeyE, KeyF, KeyG, KeyH, KeyI, KeyJ, KeyK, KeyL, KeyM, KeyN, KeyO, KeyP, KeyQ, KeyR, KeyS, KeyT, KeyU, KeyV, KeyW, KeyX, KeyY, KeyZ, Minus, Period, Quote, Semicolon, Slash, AltLeft, AltRight, Backspace, CapsLock, ContextMenu, ControlLeft, ControlRight, Enter, SuperLeft, SuperRight, ShiftLeft, ShiftRight, Space, Tab, Convert, KanaMode, Lang1, Lang2, Lang3, Lang4, Lang5, NonConvert, Delete, End, Help, Home, Insert, PageDown, PageUp, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, NumLock, Numpad0, Numpad1, Numpad2, Numpad3, Numpad4, Numpad5, Numpad6, Numpad7, Numpad8, Numpad9, NumpadAdd, NumpadBackspace, NumpadClear, NumpadClearEntry, NumpadComma, NumpadDecimal, NumpadDivide, NumpadEnter, NumpadEqual, NumpadHash, NumpadMemoryAdd, NumpadMemoryClear, NumpadMemoryRecall, NumpadMemoryStore, NumpadMemorySubtract, NumpadMultiply, NumpadParenLeft, NumpadParenRight, NumpadStar, NumpadSubtract, Escape, Fn, FnLock, PrintScreen, ScrollLock, Pause, BrowserBack, BrowserFavorites, BrowserForward, BrowserHome, BrowserRefresh, BrowserSearch, BrowserStop, Eject, LaunchApp1, LaunchApp2, LaunchMail, MediaPlayPause, MediaSelect, MediaStop, MediaTrackNext, MediaTrackPrevious, Power, Sleep, AudioVolumeDown, AudioVolumeMute, AudioVolumeUp, WakeUp, Meta, Hyper, Turbo, Abort, Resume, Suspend, Again, Copy, Cut, Find, Open, Paste, Props, Select, Undo, Hiragana, Katakana, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, F25, F26, F27, F28, F29, F30, F31, F32, F33, F34, F35,
}
Expand description

The key code of a KeyboardInput.

§Usage

It is used as the generic T value of an ButtonInput to create a Res<ButtonInput<KeyCode>>.

Code representing the location of a physical key This mostly conforms to the UI Events Specification’s KeyboardEvent.code with a few exceptions:

  • The keys that the specification calls MetaLeft and MetaRight are named SuperLeft and SuperRight here.
  • The key that the specification calls “Super” is reported as Unidentified here.

§Updating

The resource is updated inside of the keyboard_input_system.

Variants§

§

Unidentified(NativeKeyCode)

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

The native keycode is provided (if available) so you’re able to more reliably match key-press and key-release events by hashing the KeyCode. It is also possible to use this for keybinds for non-standard keys, but such keybinds are tied to a given platform.

§

Backquote

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

§

Backslash

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

[ on a US keyboard.

§

BracketRight

] on a US keyboard.

§

Comma

, on a US keyboard.

§

Digit0

0 on a US keyboard.

§

Digit1

1 on a US keyboard.

§

Digit2

2 on a US keyboard.

§

Digit3

3 on a US keyboard.

§

Digit4

4 on a US keyboard.

§

Digit5

5 on a US keyboard.

§

Digit6

6 on a US keyboard.

§

Digit7

7 on a US keyboard.

§

Digit8

8 on a US keyboard.

§

Digit9

9 on a US keyboard.

§

Equal

= on a US keyboard.

§

IntlBackslash

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

§

IntlRo

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

§

IntlYen

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

§

KeyA

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

§

KeyB

b on a US keyboard.

§

KeyC

c on a US keyboard.

§

KeyD

d on a US keyboard.

§

KeyE

e on a US keyboard.

§

KeyF

f on a US keyboard.

§

KeyG

g on a US keyboard.

§

KeyH

h on a US keyboard.

§

KeyI

i on a US keyboard.

§

KeyJ

j on a US keyboard.

§

KeyK

k on a US keyboard.

§

KeyL

l on a US keyboard.

§

KeyM

m on a US keyboard.

§

KeyN

n on a US keyboard.

§

KeyO

o on a US keyboard.

§

KeyP

p on a US keyboard.

§

KeyQ

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

§

KeyR

r on a US keyboard.

§

KeyS

s on a US keyboard.

§

KeyT

t on a US keyboard.

§

KeyU

u on a US keyboard.

§

KeyV

v on a US keyboard.

§

KeyW

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

§

KeyX

x on a US keyboard.

§

KeyY

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

§

KeyZ

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

§

Minus

- on a US keyboard.

§

Period

. on a US keyboard.

§

Quote

on a US keyboard.

§

Semicolon

; on a US keyboard.

§

Slash

/ on a US keyboard.

§

AltLeft

Alt, Option, or .

§

AltRight

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

§

Backspace

Backspace or . Labeled Delete on Apple keyboards.

§

CapsLock

CapsLock or

§

ContextMenu

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

§

ControlLeft

Control or

§

ControlRight

Control or

§

Enter

Enter or . Labeled Return on Apple keyboards.

§

SuperLeft

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

§

SuperRight

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

§

ShiftLeft

Shift or

§

ShiftRight

Shift or

§

Space

  (space)

§

Tab

Tab or

§

Convert

Japanese: (henkan)

§

KanaMode

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

§

Lang1

Korean: HangulMode 한/영 (han/yeong)

Japanese (Mac keyboard): (kana)

§

Lang2

Korean: Hanja (hanja)

Japanese (Mac keyboard): (eisu)

§

Lang3

Japanese (word-processing keyboard): Katakana

§

Lang4

Japanese (word-processing keyboard): Hiragana

§

Lang5

Japanese (word-processing keyboard): Zenkaku/Hankaku

§

NonConvert

Japanese: 無変換 (muhenkan)

§

Delete

. 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

Page Down, End, or

§

Help

Help. Not present on standard PC keyboards.

§

Home

Home or

§

Insert

Insert or Ins. Not present on Apple keyboards.

§

PageDown

Page Down, PgDn, or

§

PageUp

Page Up, PgUp, or

§

ArrowDown

§

ArrowLeft

§

ArrowRight

§

ArrowUp

§

NumLock

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

§

Numpad0

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

§

Numpad1

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

§

Numpad2

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

§

Numpad3

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

§

Numpad4

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

§

Numpad5

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

§

Numpad6

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

§

Numpad7

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

§

Numpad8

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

§

Numpad9

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

§

NumpadAdd

+

§

NumpadBackspace

Found on the Microsoft Natural Keyboard.

§

NumpadClear

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

C (Clear Entry)

§

NumpadComma

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

§

NumpadDecimal

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

§

NumpadDivide

/

§

NumpadEnter

The Enter key on the numpad.

§

NumpadEqual

=

§

NumpadHash

# 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

M Add current entry to the value stored in memory.

§

NumpadMemoryClear

M Clear the value stored in memory.

§

NumpadMemoryRecall

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

§

NumpadMemoryStore

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

§

NumpadMemorySubtract

M Subtract current entry from the value stored in memory.

§

NumpadMultiply

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

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

§

NumpadParenLeft

( Found on the Microsoft Natural Keyboard.

§

NumpadParenRight

) Found on the Microsoft Natural Keyboard.

§

NumpadStar

* 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

-

§

Escape

Esc or

§

Fn

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

§

FnLock

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

§

PrintScreen

PrtScr SysRq or Print Screen

§

ScrollLock

Scroll Lock

§

Pause

Pause Break

§

BrowserBack

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

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

§

BrowserFavorites

BrowserFavorites

§

BrowserForward

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

§

BrowserHome

The “home” button on Android.

§

BrowserRefresh

BrowserRefresh

§

BrowserSearch

BrowserSearch

§

BrowserStop

BrowserStop

§

Eject

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

§

LaunchApp1

Sometimes labelled My Computer on the keyboard

§

LaunchApp2

Sometimes labelled Calculator on the keyboard

§

LaunchMail

LaunchMail

§

MediaPlayPause

MediaPlayPause

§

MediaSelect

MediaSelect

§

MediaStop

MediaStop

§

MediaTrackNext

MediaTrackNext

§

MediaTrackPrevious

MediaTrackPrevious

§

Power

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

§

Sleep

Sleep

§

AudioVolumeDown

AudioVolumeDown

§

AudioVolumeMute

AudioVolumeMute

§

AudioVolumeUp

AudioVolumeUp

§

WakeUp

WakeUp

§

Meta

Legacy modifier key. Also called “Super” in certain places.

§

Hyper

Legacy modifier key.

§

Turbo

Turbo

§

Abort

Abort

§

Resume

Resume

§

Suspend

Suspend

§

Again

Found on Sun’s USB keyboard.

§

Copy

Found on Sun’s USB keyboard.

§

Cut

Found on Sun’s USB keyboard.

§

Find

Found on Sun’s USB keyboard.

§

Open

Found on Sun’s USB keyboard.

§

Paste

Found on Sun’s USB keyboard.

§

Props

Found on Sun’s USB keyboard.

§

Select

Found on Sun’s USB keyboard.

§

Undo

Found on Sun’s USB keyboard.

§

Hiragana

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

§

Katakana

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

§

F1

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

§

F2

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

§

F3

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

§

F4

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

§

F5

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

§

F6

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

§

F7

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

§

F8

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

§

F9

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

§

F10

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

§

F11

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

§

F12

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

§

F13

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

§

F14

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

§

F15

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

§

F16

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

§

F17

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

§

F18

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

§

F19

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

§

F20

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

§

F21

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

§

F22

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

§

F23

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

§

F24

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

§

F25

General-purpose function key.

§

F26

General-purpose function key.

§

F27

General-purpose function key.

§

F28

General-purpose function key.

§

F29

General-purpose function key.

§

F30

General-purpose function key.

§

F31

General-purpose function key.

§

F32

General-purpose function key.

§

F33

General-purpose function key.

§

F34

General-purpose function key.

§

F35

General-purpose function key.

Trait Implementations§

§

impl Clone for KeyCode

§

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
§

impl Debug for KeyCode

§

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

Formats the value using the given formatter. Read more
§

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

§

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
§

impl Enum for KeyCode
where KeyCode: Any + Send + Sync, NativeKeyCode: FromReflect + TypePath + RegisterForReflection,

§

fn field(&self, __name_param: &str) -> Option<&(dyn Reflect + 'static)>

Returns a reference to the value of the field (in the current variant) with the given name. Read more
§

fn field_at(&self, __index_param: usize) -> Option<&(dyn Reflect + 'static)>

Returns a reference to the value of the field (in the current variant) at the given index.
§

fn field_mut( &mut self, __name_param: &str ) -> Option<&mut (dyn Reflect + 'static)>

Returns a mutable reference to the value of the field (in the current variant) with the given name. Read more
§

fn field_at_mut( &mut self, __index_param: usize ) -> Option<&mut (dyn Reflect + 'static)>

Returns a mutable reference to the value of the field (in the current variant) at the given index.
§

fn index_of(&self, __name_param: &str) -> Option<usize>

Returns the index of the field (in the current variant) with the given name. Read more
§

fn name_at(&self, __index_param: usize) -> Option<&str>

Returns the name of the field (in the current variant) with the given index. Read more
§

fn iter_fields(&self) -> VariantFieldIter<'_>

Returns an iterator over the values of the current variant’s fields.
§

fn field_len(&self) -> usize

Returns the number of fields in the current variant.
§

fn variant_name(&self) -> &str

The name of the current variant.
§

fn variant_index(&self) -> usize

The index of the current variant.
§

fn variant_type(&self) -> VariantType

The type of the current variant.
§

fn clone_dynamic(&self) -> DynamicEnum

§

fn is_variant(&self, variant_type: VariantType) -> bool

Returns true if the current variant’s type matches the given one.
§

fn variant_path(&self) -> String

Returns the full path to the current variant.
§

impl FromReflect for KeyCode
where KeyCode: Any + Send + Sync, NativeKeyCode: FromReflect + TypePath + RegisterForReflection,

§

fn from_reflect(__param0: &(dyn Reflect + 'static)) -> Option<KeyCode>

Constructs a concrete instance of Self from a reflected value.
§

fn take_from_reflect( reflect: Box<dyn Reflect> ) -> Result<Self, Box<dyn Reflect>>

Attempts to downcast the given value to Self using, constructing the value using from_reflect if that fails. Read more
§

impl GetTypeRegistration for KeyCode
where KeyCode: Any + Send + Sync, NativeKeyCode: FromReflect + TypePath + RegisterForReflection,

§

fn get_type_registration() -> TypeRegistration

Returns the default TypeRegistration for this type.
§

fn register_type_dependencies(registry: &mut TypeRegistry)

Registers other types needed by this type. Read more
§

impl Hash for KeyCode

§

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
§

impl Ord for KeyCode

§

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 + PartialOrd,

Restrict a value to a certain interval. Read more
§

impl PartialEq for KeyCode

§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

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

impl PartialOrd for KeyCode

§

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

This method 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

This method 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

This method 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

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

impl Reflect for KeyCode
where KeyCode: Any + Send + Sync, NativeKeyCode: FromReflect + TypePath + RegisterForReflection,

§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Returns the TypeInfo of the type represented by this value. Read more
§

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

Returns the value as a Box<dyn Any>.
§

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

Returns the value as a &dyn Any.
§

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

Returns the value as a &mut dyn Any.
§

fn into_reflect(self: Box<KeyCode>) -> Box<dyn Reflect>

Casts this type to a boxed reflected value.
§

fn as_reflect(&self) -> &(dyn Reflect + 'static)

Casts this type to a reflected value.
§

fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)

Casts this type to a mutable reflected value.
§

fn clone_value(&self) -> Box<dyn Reflect>

Clones the value as a Reflect trait object. Read more
§

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

Performs a type-checked assignment of a reflected value to this value. Read more
§

fn apply(&mut self, __value_param: &(dyn Reflect + 'static))

Applies a reflected value to this value. Read more
§

fn reflect_kind(&self) -> ReflectKind

Returns a zero-sized enumeration of “kinds” of type. Read more
§

fn reflect_ref(&self) -> ReflectRef<'_>

Returns an immutable enumeration of “kinds” of type. Read more
§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Returns a mutable enumeration of “kinds” of type. Read more
§

fn reflect_owned(self: Box<KeyCode>) -> ReflectOwned

Returns an owned enumeration of “kinds” of type. Read more
§

fn reflect_hash(&self) -> Option<u64>

Returns a hash of the value (which includes the type). Read more
§

fn reflect_partial_eq(&self, value: &(dyn Reflect + 'static)) -> Option<bool>

Returns a “partial equality” comparison result. Read more
§

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

Debug formatter for the value. Read more
§

fn serializable(&self) -> Option<Serializable<'_>>

Returns a serializable version of the value. Read more
§

fn is_dynamic(&self) -> bool

Indicates whether or not this type is a dynamic type. Read more
§

impl Serialize for KeyCode

§

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
§

impl TypePath for KeyCode
where KeyCode: Any + Send + Sync,

§

fn type_path() -> &'static str

Returns the fully qualified path of the underlying type. Read more
§

fn short_type_path() -> &'static str

Returns a short, pretty-print enabled path to the type. Read more
§

fn type_ident() -> Option<&'static str>

Returns the name of the type, or None if it is anonymous. Read more
§

fn crate_name() -> Option<&'static str>

Returns the name of the crate the type is in, or None if it is anonymous. Read more
§

fn module_path() -> Option<&'static str>

Returns the path to the module the type is in, or None if it is anonymous. Read more
§

impl Typed for KeyCode
where KeyCode: Any + Send + Sync, NativeKeyCode: FromReflect + TypePath + RegisterForReflection,

§

fn type_info() -> &'static TypeInfo

Returns the compile-time info for the underlying type.
§

impl Copy for KeyCode

§

impl Eq for KeyCode

§

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
§

impl<T, U> AsBindGroupShaderType<U> for T
where U: ShaderType, &'a T: for<'a> Into<U>,

§

fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U

Return the T ShaderType for self. When used in AsBindGroup derives, it is safe to assume that all images in self exist.
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
§

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

§

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

Compare self to key and return their ordering.
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

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

§

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.
§

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.
§

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.
§

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.
§

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

§

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.
§

impl<T> DynEq for T
where T: Any + Eq,

§

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

Casts the type to dyn Any.
§

fn dyn_eq(&self, other: &(dyn DynEq + 'static)) -> bool

This method tests for self and other values to be equal. Read more
§

impl<T> DynHash for T
where T: DynEq + Hash,

§

fn as_dyn_eq(&self) -> &(dyn DynEq + 'static)

Casts the type to dyn Any.
§

fn dyn_hash(&self, state: &mut dyn Hasher)

Feeds this value into the given Hasher.
§

impl<T> DynamicTypePath for T
where T: TypePath,

§

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

§

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

Checks if this value is equivalent to the given key. Read more
§

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

§

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

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

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> GetPath for T
where T: Reflect + ?Sized,

§

fn reflect_path<'p>( &self, path: impl ReflectPath<'p> ) -> Result<&(dyn Reflect + 'static), ReflectPathError<'p>>

Returns a reference to the value specified by path. Read more
§

fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p> ) -> Result<&mut (dyn Reflect + 'static), ReflectPathError<'p>>

Returns a mutable reference to the value specified by path. Read more
§

fn path<'p, T>( &self, path: impl ReflectPath<'p> ) -> Result<&T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed reference to the value specified by path. Read more
§

fn path_mut<'p, T>( &mut self, path: impl ReflectPath<'p> ) -> Result<&mut T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed mutable reference to the value specified by path. Read more
§

impl<T> Instrument for T

§

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

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

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
§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer ) -> Result<(), ErrorImpl>

source§

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

§

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
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

source§

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

§

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>,

§

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.
§

impl<T> TypeData for T
where T: 'static + Send + Sync + Clone,

§

fn clone_type_data(&self) -> Box<dyn TypeData>

§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ConditionalSend for T
where T: Send,

source§

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

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

source§

impl<N> NodeTrait for N
where N: Copy + Ord + Hash,

§

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

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,