Struct Keycode

pub struct Keycode(/* private fields */);
Available on crate feature dep_sdl2 only.

Implementations§

§

impl Keycode

pub const BACKSPACE: Keycode

pub const TAB: Keycode

pub const RETURN: Keycode

pub const ESCAPE: Keycode

pub const SPACE: Keycode

pub const EXCLAIM: Keycode

pub const QUOTEDBL: Keycode

pub const HASH: Keycode

pub const DOLLAR: Keycode

pub const PERCENT: Keycode

pub const AMPERSAND: Keycode

pub const QUOTE: Keycode

pub const LEFTPAREN: Keycode

pub const RIGHTPAREN: Keycode

pub const ASTERISK: Keycode

pub const PLUS: Keycode

pub const COMMA: Keycode

pub const MINUS: Keycode

pub const PERIOD: Keycode

pub const SLASH: Keycode

pub const NUM_0: Keycode

pub const NUM_1: Keycode

pub const NUM_2: Keycode

pub const NUM_3: Keycode

pub const NUM_4: Keycode

pub const NUM_5: Keycode

pub const NUM_6: Keycode

pub const NUM_7: Keycode

pub const NUM_8: Keycode

pub const NUM_9: Keycode

pub const COLON: Keycode

pub const SEMICOLON: Keycode

pub const LESS: Keycode

pub const EQUALS: Keycode

pub const GREATER: Keycode

pub const QUESTION: Keycode

pub const AT: Keycode

pub const LEFTBRACKET: Keycode

pub const BACKSLASH: Keycode

pub const RIGHTBRACKET: Keycode

pub const CARET: Keycode

pub const UNDERSCORE: Keycode

pub const BACKQUOTE: Keycode

pub const A: Keycode

pub const B: Keycode

pub const C: Keycode

pub const D: Keycode

pub const E: Keycode

pub const F: Keycode

pub const G: Keycode

pub const H: Keycode

pub const I: Keycode

pub const J: Keycode

pub const K: Keycode

pub const L: Keycode

pub const M: Keycode

pub const N: Keycode

pub const O: Keycode

pub const P: Keycode

pub const Q: Keycode

pub const R: Keycode

pub const S: Keycode

pub const T: Keycode

pub const U: Keycode

pub const V: Keycode

pub const W: Keycode

pub const X: Keycode

pub const Y: Keycode

pub const Z: Keycode

pub const DELETE: Keycode

pub const CAPSLOCK: Keycode

pub const F1: Keycode

pub const F2: Keycode

pub const F3: Keycode

pub const F4: Keycode

pub const F5: Keycode

pub const F6: Keycode

pub const F7: Keycode

pub const F8: Keycode

pub const F9: Keycode

pub const F10: Keycode

pub const F11: Keycode

pub const F12: Keycode

pub const PRINTSCREEN: Keycode

pub const SCROLLLOCK: Keycode

pub const PAUSE: Keycode

pub const INSERT: Keycode

pub const HOME: Keycode

pub const PAGEUP: Keycode

pub const END: Keycode

pub const PAGEDOWN: Keycode

pub const RIGHT: Keycode

pub const LEFT: Keycode

pub const DOWN: Keycode

pub const UP: Keycode

pub const NUMLOCKCLEAR: Keycode

pub const KP_DIVIDE: Keycode

pub const KP_MULTIPLY: Keycode

pub const KP_MINUS: Keycode

pub const KP_PLUS: Keycode

pub const KP_ENTER: Keycode

pub const KP_1: Keycode

pub const KP_2: Keycode

pub const KP_3: Keycode

pub const KP_4: Keycode

pub const KP_5: Keycode

pub const KP_6: Keycode

pub const KP_7: Keycode

pub const KP_8: Keycode

pub const KP_9: Keycode

pub const KP_0: Keycode

pub const KP_PERIOD: Keycode

pub const APPLICATION: Keycode

pub const POWER: Keycode

pub const KP_EQUALS: Keycode

pub const F13: Keycode

pub const F14: Keycode

pub const F15: Keycode

pub const F16: Keycode

pub const F17: Keycode

pub const F18: Keycode

pub const F19: Keycode

pub const F20: Keycode

pub const F21: Keycode

pub const F22: Keycode

pub const F23: Keycode

pub const F24: Keycode

pub const EXECUTE: Keycode

pub const HELP: Keycode

pub const MENU: Keycode

pub const SELECT: Keycode

pub const STOP: Keycode

pub const AGAIN: Keycode

pub const UNDO: Keycode

pub const CUT: Keycode

pub const COPY: Keycode

pub const PASTE: Keycode

pub const FIND: Keycode

pub const MUTE: Keycode

pub const VOLUMEUP: Keycode

pub const VOLUMEDOWN: Keycode

pub const KP_COMMA: Keycode

pub const KP_EQUALSAS400: Keycode

pub const ALTERASE: Keycode

pub const SYSREQ: Keycode

pub const CANCEL: Keycode

pub const CLEAR: Keycode

pub const PRIOR: Keycode

pub const RETURN2: Keycode

pub const SEPARATOR: Keycode

pub const OUT: Keycode

pub const OPER: Keycode

pub const CLEARAGAIN: Keycode

pub const CRSEL: Keycode

pub const EXSEL: Keycode

pub const KP_00: Keycode

pub const KP_000: Keycode

pub const THOUSANDSSEPARATOR: Keycode

pub const DECIMALSEPARATOR: Keycode

pub const CURRENCYUNIT: Keycode

pub const CURRENCYSUBUNIT: Keycode

pub const KP_LEFTPAREN: Keycode

pub const KP_RIGHTPAREN: Keycode

pub const KP_LEFTBRACE: Keycode

pub const KP_RIGHTBRACE: Keycode

pub const KP_TAB: Keycode

pub const KP_BACKSPACE: Keycode

pub const KP_A: Keycode

pub const KP_B: Keycode

pub const KP_C: Keycode

pub const KP_D: Keycode

pub const KP_E: Keycode

pub const KP_F: Keycode

pub const KP_XOR: Keycode

pub const KP_POWER: Keycode

pub const KP_PERCENT: Keycode

pub const KP_LESS: Keycode

pub const KP_GREATER: Keycode

pub const KP_AMPERSAND: Keycode

pub const KP_DBLAMPERSAND: Keycode

pub const KP_VERTICALBAR: Keycode

pub const KP_DBLVERTICALBAR: Keycode

pub const KP_COLON: Keycode

pub const KP_HASH: Keycode

pub const KP_SPACE: Keycode

pub const KP_AT: Keycode

pub const KP_EXCLAM: Keycode

pub const KP_MEMSTORE: Keycode

pub const KP_MEMRECALL: Keycode

pub const KP_MEMCLEAR: Keycode

pub const KP_MEMADD: Keycode

pub const KP_MEMSUBTRACT: Keycode

pub const KP_MEMMULTIPLY: Keycode

pub const KP_MEMDIVIDE: Keycode

pub const KP_PLUSMINUS: Keycode

pub const KP_CLEAR: Keycode

pub const KP_CLEARENTRY: Keycode

pub const KP_BINARY: Keycode

pub const KP_OCTAL: Keycode

pub const KP_DECIMAL: Keycode

pub const KP_HEXADECIMAL: Keycode

pub const LCTRL: Keycode

pub const LSHIFT: Keycode

pub const LALT: Keycode

pub const LGUI: Keycode

pub const RCTRL: Keycode

pub const RSHIFT: Keycode

pub const RALT: Keycode

pub const RGUI: Keycode

pub const MODE: Keycode

pub const AUDIONEXT: Keycode

pub const AUDIOPREV: Keycode

pub const AUDIOSTOP: Keycode

pub const AUDIOPLAY: Keycode

pub const AUDIOMUTE: Keycode

pub const MEDIASELECT: Keycode

pub const WWW: Keycode

pub const MAIL: Keycode

pub const CALCULATOR: Keycode

pub const COMPUTER: Keycode

pub const AC_HOME: Keycode

pub const AC_BACK: Keycode

pub const AC_FORWARD: Keycode

pub const AC_STOP: Keycode

pub const AC_REFRESH: Keycode

pub const AC_BOOKMARKS: Keycode

pub const BRIGHTNESSDOWN: Keycode

pub const BRIGHTNESSUP: Keycode

pub const DISPLAYSWITCH: Keycode

pub const KBDILLUMTOGGLE: Keycode

pub const KBDILLUMDOWN: Keycode

pub const KBDILLUMUP: Keycode

pub const EJECT: Keycode

pub const SLEEP: Keycode

pub const Backspace: Keycode = Keycode::BACKSPACE

pub const Tab: Keycode = Keycode::TAB

pub const Return: Keycode = Keycode::RETURN

pub const Escape: Keycode = Keycode::ESCAPE

pub const Space: Keycode = Keycode::SPACE

pub const Exclaim: Keycode = Keycode::EXCLAIM

pub const Quotedbl: Keycode = Keycode::QUOTEDBL

pub const Hash: Keycode = Keycode::HASH

pub const Dollar: Keycode = Keycode::DOLLAR

pub const Percent: Keycode = Keycode::PERCENT

pub const Ampersand: Keycode = Keycode::AMPERSAND

pub const Quote: Keycode = Keycode::QUOTE

pub const LeftParen: Keycode = Keycode::LEFTPAREN

pub const RightParen: Keycode = Keycode::RIGHTPAREN

pub const Asterisk: Keycode = Keycode::ASTERISK

pub const Plus: Keycode = Keycode::PLUS

pub const Comma: Keycode = Keycode::COMMA

pub const Minus: Keycode = Keycode::MINUS

pub const Period: Keycode = Keycode::PERIOD

pub const Slash: Keycode = Keycode::SLASH

pub const Num0: Keycode = Keycode::NUM_0

pub const Num1: Keycode = Keycode::NUM_1

pub const Num2: Keycode = Keycode::NUM_2

pub const Num3: Keycode = Keycode::NUM_3

pub const Num4: Keycode = Keycode::NUM_4

pub const Num5: Keycode = Keycode::NUM_5

pub const Num6: Keycode = Keycode::NUM_6

pub const Num7: Keycode = Keycode::NUM_7

pub const Num8: Keycode = Keycode::NUM_8

pub const Num9: Keycode = Keycode::NUM_9

pub const Colon: Keycode = Keycode::COLON

pub const Semicolon: Keycode = Keycode::SEMICOLON

pub const Less: Keycode = Keycode::LESS

pub const Equals: Keycode = Keycode::EQUALS

pub const Greater: Keycode = Keycode::GREATER

pub const Question: Keycode = Keycode::QUESTION

pub const At: Keycode = Keycode::AT

pub const LeftBracket: Keycode = Keycode::LEFTBRACKET

pub const Backslash: Keycode = Keycode::BACKSLASH

pub const RightBracket: Keycode = Keycode::RIGHTBRACKET

pub const Caret: Keycode = Keycode::CARET

pub const Underscore: Keycode = Keycode::UNDERSCORE

pub const Backquote: Keycode = Keycode::BACKQUOTE

pub const Delete: Keycode = Keycode::DELETE

pub const CapsLock: Keycode = Keycode::CAPSLOCK

pub const PrintScreen: Keycode = Keycode::PRINTSCREEN

pub const ScrollLock: Keycode = Keycode::SCROLLLOCK

pub const Pause: Keycode = Keycode::PAUSE

pub const Insert: Keycode = Keycode::INSERT

pub const Home: Keycode = Keycode::HOME

pub const PageUp: Keycode = Keycode::PAGEUP

pub const End: Keycode = Keycode::END

pub const PageDown: Keycode = Keycode::PAGEDOWN

pub const Right: Keycode = Keycode::RIGHT

pub const Left: Keycode = Keycode::LEFT

pub const Down: Keycode = Keycode::DOWN

pub const Up: Keycode = Keycode::UP

pub const NumLockClear: Keycode = Keycode::NUMLOCKCLEAR

pub const KpDivide: Keycode = Keycode::KP_DIVIDE

pub const KpMultiply: Keycode = Keycode::KP_MULTIPLY

pub const KpMinus: Keycode = Keycode::KP_MINUS

pub const KpPlus: Keycode = Keycode::KP_PLUS

pub const KpEnter: Keycode = Keycode::KP_ENTER

pub const Kp1: Keycode = Keycode::KP_1

pub const Kp2: Keycode = Keycode::KP_2

pub const Kp3: Keycode = Keycode::KP_3

pub const Kp4: Keycode = Keycode::KP_4

pub const Kp5: Keycode = Keycode::KP_5

pub const Kp6: Keycode = Keycode::KP_6

pub const Kp7: Keycode = Keycode::KP_7

pub const Kp8: Keycode = Keycode::KP_8

pub const Kp9: Keycode = Keycode::KP_9

pub const Kp0: Keycode = Keycode::KP_0

pub const KpPeriod: Keycode = Keycode::KP_PERIOD

pub const Application: Keycode = Keycode::APPLICATION

pub const Power: Keycode = Keycode::POWER

pub const KpEquals: Keycode = Keycode::KP_EQUALS

pub const Execute: Keycode = Keycode::EXECUTE

pub const Help: Keycode = Keycode::HELP

pub const Menu: Keycode = Keycode::MENU

pub const Select: Keycode = Keycode::SELECT

pub const Stop: Keycode = Keycode::STOP

pub const Again: Keycode = Keycode::AGAIN

pub const Undo: Keycode = Keycode::UNDO

pub const Cut: Keycode = Keycode::CUT

pub const Copy: Keycode = Keycode::COPY

pub const Paste: Keycode = Keycode::PASTE

pub const Find: Keycode = Keycode::FIND

pub const Mute: Keycode = Keycode::MUTE

pub const VolumeUp: Keycode = Keycode::VOLUMEUP

pub const VolumeDown: Keycode = Keycode::VOLUMEDOWN

pub const KpComma: Keycode = Keycode::KP_COMMA

pub const KpEqualsAS400: Keycode = Keycode::KP_EQUALSAS400

pub const AltErase: Keycode = Keycode::ALTERASE

pub const Sysreq: Keycode = Keycode::SYSREQ

pub const Cancel: Keycode = Keycode::CANCEL

pub const Clear: Keycode = Keycode::CLEAR

pub const Prior: Keycode = Keycode::PRIOR

pub const Return2: Keycode = Keycode::RETURN2

pub const Separator: Keycode = Keycode::SEPARATOR

pub const Out: Keycode = Keycode::OUT

pub const Oper: Keycode = Keycode::OPER

pub const ClearAgain: Keycode = Keycode::CLEARAGAIN

pub const CrSel: Keycode = Keycode::CRSEL

pub const ExSel: Keycode = Keycode::EXSEL

pub const Kp00: Keycode = Keycode::KP_00

pub const Kp000: Keycode = Keycode::KP_000

pub const ThousandsSeparator: Keycode = Keycode::THOUSANDSSEPARATOR

pub const DecimalSeparator: Keycode = Keycode::DECIMALSEPARATOR

pub const CurrencyUnit: Keycode = Keycode::CURRENCYUNIT

pub const CurrencySubUnit: Keycode = Keycode::CURRENCYSUBUNIT

pub const KpLeftParen: Keycode = Keycode::KP_LEFTPAREN

pub const KpRightParen: Keycode = Keycode::KP_RIGHTPAREN

pub const KpLeftBrace: Keycode = Keycode::KP_LEFTBRACE

pub const KpRightBrace: Keycode = Keycode::KP_RIGHTBRACE

pub const KpTab: Keycode = Keycode::KP_TAB

pub const KpBackspace: Keycode = Keycode::KP_BACKSPACE

pub const KpA: Keycode = Keycode::KP_A

pub const KpB: Keycode = Keycode::KP_B

pub const KpC: Keycode = Keycode::KP_C

pub const KpD: Keycode = Keycode::KP_D

pub const KpE: Keycode = Keycode::KP_E

pub const KpF: Keycode = Keycode::KP_F

pub const KpXor: Keycode = Keycode::KP_XOR

pub const KpPower: Keycode = Keycode::KP_POWER

pub const KpPercent: Keycode = Keycode::KP_PERCENT

pub const KpLess: Keycode = Keycode::KP_LESS

pub const KpGreater: Keycode = Keycode::KP_GREATER

pub const KpAmpersand: Keycode = Keycode::KP_AMPERSAND

pub const KpDblAmpersand: Keycode = Keycode::KP_DBLAMPERSAND

pub const KpVerticalBar: Keycode = Keycode::KP_VERTICALBAR

pub const KpDblVerticalBar: Keycode = Keycode::KP_DBLVERTICALBAR

pub const KpColon: Keycode = Keycode::KP_COLON

pub const KpHash: Keycode = Keycode::KP_HASH

pub const KpSpace: Keycode = Keycode::KP_SPACE

pub const KpAt: Keycode = Keycode::KP_AT

pub const KpExclam: Keycode = Keycode::KP_EXCLAM

pub const KpMemStore: Keycode = Keycode::KP_MEMSTORE

pub const KpMemRecall: Keycode = Keycode::KP_MEMRECALL

pub const KpMemClear: Keycode = Keycode::KP_MEMCLEAR

pub const KpMemAdd: Keycode = Keycode::KP_MEMADD

pub const KpMemSubtract: Keycode = Keycode::KP_MEMSUBTRACT

pub const KpMemMultiply: Keycode = Keycode::KP_MEMMULTIPLY

pub const KpMemDivide: Keycode = Keycode::KP_MEMDIVIDE

pub const KpPlusMinus: Keycode = Keycode::KP_PLUSMINUS

pub const KpClear: Keycode = Keycode::KP_CLEAR

pub const KpClearEntry: Keycode = Keycode::KP_CLEARENTRY

pub const KpBinary: Keycode = Keycode::KP_BINARY

pub const KpOctal: Keycode = Keycode::KP_OCTAL

pub const KpDecimal: Keycode = Keycode::KP_DECIMAL

pub const KpHexadecimal: Keycode = Keycode::KP_HEXADECIMAL

pub const LCtrl: Keycode = Keycode::LCTRL

pub const LShift: Keycode = Keycode::LSHIFT

pub const LAlt: Keycode = Keycode::LALT

pub const LGui: Keycode = Keycode::LGUI

pub const RCtrl: Keycode = Keycode::RCTRL

pub const RShift: Keycode = Keycode::RSHIFT

pub const RAlt: Keycode = Keycode::RALT

pub const RGui: Keycode = Keycode::RGUI

pub const Mode: Keycode = Keycode::MODE

pub const AudioNext: Keycode = Keycode::AUDIONEXT

pub const AudioPrev: Keycode = Keycode::AUDIOPREV

pub const AudioStop: Keycode = Keycode::AUDIOSTOP

pub const AudioPlay: Keycode = Keycode::AUDIOPLAY

pub const AudioMute: Keycode = Keycode::AUDIOMUTE

pub const MediaSelect: Keycode = Keycode::MEDIASELECT

pub const Www: Keycode = Keycode::WWW

pub const Mail: Keycode = Keycode::MAIL

pub const Calculator: Keycode = Keycode::CALCULATOR

pub const Computer: Keycode = Keycode::COMPUTER

pub const AcSearch: Keycode = Keycode::AC_SEARCH

pub const AcHome: Keycode = Keycode::AC_HOME

pub const AcBack: Keycode = Keycode::AC_BACK

pub const AcForward: Keycode = Keycode::AC_FORWARD

pub const AcStop: Keycode = Keycode::AC_STOP

pub const AcRefresh: Keycode = Keycode::AC_REFRESH

pub const AcBookmarks: Keycode = Keycode::AC_BOOKMARKS

pub const BrightnessDown: Keycode = Keycode::BRIGHTNESSDOWN

pub const BrightnessUp: Keycode = Keycode::BRIGHTNESSUP

pub const DisplaySwitch: Keycode = Keycode::DISPLAYSWITCH

pub const KbdIllumToggle: Keycode = Keycode::KBDILLUMTOGGLE

pub const KbdIllumDown: Keycode = Keycode::KBDILLUMDOWN

pub const KbdIllumUp: Keycode = Keycode::KBDILLUMUP

pub const Eject: Keycode = Keycode::EJECT

pub const Sleep: Keycode = Keycode::SLEEP

§

impl Keycode

pub fn into_i32(&self) -> i32

pub fn from_i32(n: i32) -> Option<Keycode>

§

impl Keycode

pub fn from_scancode(scancode: Scancode) -> Option<Keycode>

Gets the virtual key from a scancode. Returns None if there is no corresponding virtual key.

pub fn from_name(name: &str) -> Option<Keycode>

pub fn name(self) -> String

Methods from Deref<Target = i32>§

1.43.0 · Source

pub const MIN: i32 = -2_147_483_648i32

1.43.0 · Source

pub const MAX: i32 = 2_147_483_647i32

1.53.0 · Source

pub const BITS: u32 = 32u32

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 Deref for Keycode

§

type Target = i32

The resulting type after dereferencing.
§

fn deref(&self) -> &i32

Dereferences the value.
§

impl Display for Keycode

§

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

Formats the value using the given formatter. 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 Into<i32> for Keycode

§

fn into(self) -> i32

Converts this type into the (usually inferred) input type.
§

impl PartialEq for Keycode

§

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

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
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> ByteSized for T

Source§

const BYTE_ALIGN: usize = _

The alignment of this type in bytes.
Source§

const BYTE_SIZE: usize = _

The size of this type in bytes.
Source§

fn byte_align(&self) -> usize

Returns the alignment of this type in bytes.
Source§

fn byte_size(&self) -> usize

Returns the size of this type in bytes. Read more
Source§

fn ptr_size_ratio(&self) -> [usize; 2]

Returns the size ratio between Ptr::BYTES and BYTE_SIZE. Read more
Source§

impl<T, R> Chain<R> for T
where T: ?Sized,

Source§

fn chain<F>(self, f: F) -> R
where F: FnOnce(Self) -> R, Self: Sized,

Chain a function which takes the parameter by value.
Source§

fn chain_ref<F>(&self, f: F) -> R
where F: FnOnce(&Self) -> R,

Chain a function which takes the parameter by shared reference.
Source§

fn chain_mut<F>(&mut self, f: F) -> R
where F: FnOnce(&mut Self) -> R,

Chain a function which takes the parameter by exclusive reference.
Source§

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

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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> ExtAny for T
where T: Any + ?Sized,

Source§

fn type_id() -> TypeId

Returns the TypeId of Self. Read more
Source§

fn type_of(&self) -> TypeId

Returns the TypeId of self. Read more
Source§

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

Returns the type name of self. Read more
Source§

fn type_is<T: 'static>(&self) -> bool

Returns true if Self is of type T. Read more
Source§

fn type_hash(&self) -> u64

Returns a deterministic hash of the TypeId of Self.
Source§

fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64

Returns a deterministic hash of the TypeId of Self using a custom hasher.
Source§

fn as_any_ref(&self) -> &dyn Any
where Self: Sized,

Upcasts &self as &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any
where Self: Sized,

Upcasts &mut self as &mut dyn Any. Read more
Source§

fn as_any_box(self: Box<Self>) -> Box<dyn Any>
where Self: Sized,

Upcasts Box<self> as Box<dyn Any>. Read more
Source§

fn downcast_ref<T: 'static>(&self) -> Option<&T>

Available on crate feature unsafe_layout only.
Returns some shared reference to the inner value if it is of type T. Read more
Source§

fn downcast_mut<T: 'static>(&mut self) -> Option<&mut T>

Available on crate feature unsafe_layout only.
Returns some exclusive reference to the inner value if it is of type T. Read more
Source§

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

Source§

const NEEDS_DROP: bool = _

Know whether dropping values of this type matters, in compile-time.
Source§

fn mem_align_of<T>() -> usize

Returns the minimum alignment of the type in bytes. Read more
Source§

fn mem_align_of_val(&self) -> usize

Returns the alignment of the pointed-to value in bytes. Read more
Source§

fn mem_size_of<T>() -> usize

Returns the size of a type in bytes. Read more
Source§

fn mem_size_of_val(&self) -> usize

Returns the size of the pointed-to value in bytes. Read more
Source§

fn mem_copy(&self) -> Self
where Self: Copy,

Bitwise-copies a value. Read more
Source§

fn mem_needs_drop(&self) -> bool

Returns true if dropping values of this type matters. Read more
Source§

fn mem_drop(self)
where Self: Sized,

Drops self by running its destructor. Read more
Source§

fn mem_forget(self)
where Self: Sized,

Forgets about self without running its destructor. Read more
Source§

fn mem_replace(&mut self, other: Self) -> Self
where Self: Sized,

Replaces self with other, returning the previous value of self. Read more
Source§

fn mem_take(&mut self) -> Self
where Self: Default,

Replaces self with its default value, returning the previous value of self. Read more
Source§

fn mem_swap(&mut self, other: &mut Self)
where Self: Sized,

Swaps the value of self and other without deinitializing either one. Read more
Source§

unsafe fn mem_zeroed<T>() -> T

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst

Available on crate feature unsafe_layout only.
Returns the value of type T represented by the all-zero byte-pattern. Read more
Source§

fn mem_as_bytes(&self) -> &[u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &[u8]. Read more
Source§

fn mem_as_bytes_mut(&mut self) -> &mut [u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &mut [u8]. Read more
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

Source§

impl<T> Hook for T

Source§

fn hook_ref<F>(self, f: F) -> Self
where F: FnOnce(&Self),

Applies a function which takes the parameter by shared reference, and then returns the (possibly) modified owned value. Read more
Source§

fn hook_mut<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Applies a function which takes the parameter by exclusive reference, and then returns the (possibly) modified owned value. 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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
§

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

§

fn to_sample_(self) -> U

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
§

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<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

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