Struct SDL_Scancode
#[repr(transparent)]pub struct SDL_Scancode(pub i32);
dep_sdl3
only.Expand description
The SDL keyboard scancode representation.
An SDL scancode is the physical representation of a key on the keyboard, independent of language and keyboard mapping.
Values of this type are used to represent keyboard keys, among other places
in the scancode
field of the [SDL_KeyboardEvent
] structure.
The values in this enumeration are based on the USB usage page standard: https://usb.org/sites/default/files/hut1_5.pdf
§Availability
This enum is available since SDL 3.2.0.
§Known values (sdl3-sys
)
Tuple Fields§
§0: i32
Implementations§
§impl SDL_Scancode
impl SDL_Scancode
pub const UNKNOWN: SDL_Scancode
pub const A: SDL_Scancode
pub const B: SDL_Scancode
pub const C: SDL_Scancode
pub const D: SDL_Scancode
pub const E: SDL_Scancode
pub const F: SDL_Scancode
pub const G: SDL_Scancode
pub const H: SDL_Scancode
pub const I: SDL_Scancode
pub const J: SDL_Scancode
pub const K: SDL_Scancode
pub const L: SDL_Scancode
pub const M: SDL_Scancode
pub const N: SDL_Scancode
pub const O: SDL_Scancode
pub const P: SDL_Scancode
pub const Q: SDL_Scancode
pub const R: SDL_Scancode
pub const S: SDL_Scancode
pub const T: SDL_Scancode
pub const U: SDL_Scancode
pub const V: SDL_Scancode
pub const W: SDL_Scancode
pub const X: SDL_Scancode
pub const Y: SDL_Scancode
pub const Z: SDL_Scancode
pub const _1: SDL_Scancode
pub const _2: SDL_Scancode
pub const _3: SDL_Scancode
pub const _4: SDL_Scancode
pub const _5: SDL_Scancode
pub const _6: SDL_Scancode
pub const _7: SDL_Scancode
pub const _8: SDL_Scancode
pub const _9: SDL_Scancode
pub const _0: SDL_Scancode
pub const RETURN: SDL_Scancode
pub const ESCAPE: SDL_Scancode
pub const BACKSPACE: SDL_Scancode
pub const TAB: SDL_Scancode
pub const SPACE: SDL_Scancode
pub const MINUS: SDL_Scancode
pub const EQUALS: SDL_Scancode
pub const LEFTBRACKET: SDL_Scancode
pub const RIGHTBRACKET: SDL_Scancode
pub const BACKSLASH: SDL_Scancode
pub const BACKSLASH: SDL_Scancode
Located at the lower left of the return key on ISO keyboards and at the right end of the QWERTY row on ANSI keyboards. Produces REVERSE SOLIDUS (backslash) and VERTICAL LINE in a US layout, REVERSE SOLIDUS and VERTICAL LINE in a UK Mac layout, NUMBER SIGN and TILDE in a UK Windows layout, DOLLAR SIGN and POUND SIGN in a Swiss German layout, NUMBER SIGN and APOSTROPHE in a German layout, GRAVE ACCENT and POUND SIGN in a French Mac layout, and ASTERISK and MICRO SIGN in a French Windows layout.
pub const NONUSHASH: SDL_Scancode
pub const NONUSHASH: SDL_Scancode
ISO USB keyboards actually use this code
instead of 49 for the same key, but all
OSes I’ve seen treat the two codes
identically. So, as an implementor, unless
your keyboard generates both of those
codes and your OS treats them differently,
you should generate SDL_SCANCODE_BACKSLASH
instead of this code. As a user, you
should not rely on this code because SDL
will never generate it with most (all?)
keyboards.
pub const SEMICOLON: SDL_Scancode
pub const APOSTROPHE: SDL_Scancode
pub const GRAVE: SDL_Scancode
pub const GRAVE: SDL_Scancode
Located in the top left corner (on both ANSI and ISO keyboards). Produces GRAVE ACCENT and TILDE in a US Windows layout and in US and UK Mac layouts on ANSI keyboards, GRAVE ACCENT and NOT SIGN in a UK Windows layout, SECTION SIGN and PLUS-MINUS SIGN in US and UK Mac layouts on ISO keyboards, SECTION SIGN and DEGREE SIGN in a Swiss German layout (Mac: only on ISO keyboards), CIRCUMFLEX ACCENT and DEGREE SIGN in a German layout (Mac: only on ISO keyboards), SUPERSCRIPT TWO and TILDE in a French Windows layout, COMMERCIAL AT and NUMBER SIGN in a French Mac layout on ISO keyboards, and LESS-THAN SIGN and GREATER-THAN SIGN in a Swiss German, German, or French Mac layout on ANSI keyboards.
pub const COMMA: SDL_Scancode
pub const PERIOD: SDL_Scancode
pub const SLASH: SDL_Scancode
pub const CAPSLOCK: SDL_Scancode
pub const F1: SDL_Scancode
pub const F2: SDL_Scancode
pub const F3: SDL_Scancode
pub const F4: SDL_Scancode
pub const F5: SDL_Scancode
pub const F6: SDL_Scancode
pub const F7: SDL_Scancode
pub const F8: SDL_Scancode
pub const F9: SDL_Scancode
pub const F10: SDL_Scancode
pub const F11: SDL_Scancode
pub const F12: SDL_Scancode
pub const PRINTSCREEN: SDL_Scancode
pub const SCROLLLOCK: SDL_Scancode
pub const PAUSE: SDL_Scancode
pub const INSERT: SDL_Scancode
pub const INSERT: SDL_Scancode
insert on PC, help on some Mac keyboards (but does send code 73, not 117)
pub const HOME: SDL_Scancode
pub const PAGEUP: SDL_Scancode
pub const DELETE: SDL_Scancode
pub const END: SDL_Scancode
pub const PAGEDOWN: SDL_Scancode
pub const RIGHT: SDL_Scancode
pub const LEFT: SDL_Scancode
pub const DOWN: SDL_Scancode
pub const UP: SDL_Scancode
pub const NUMLOCKCLEAR: SDL_Scancode
pub const NUMLOCKCLEAR: SDL_Scancode
num lock on PC, clear on Mac keyboards
pub const KP_DIVIDE: SDL_Scancode
pub const KP_MULTIPLY: SDL_Scancode
pub const KP_MINUS: SDL_Scancode
pub const KP_PLUS: SDL_Scancode
pub const KP_ENTER: SDL_Scancode
pub const KP_1: SDL_Scancode
pub const KP_2: SDL_Scancode
pub const KP_3: SDL_Scancode
pub const KP_4: SDL_Scancode
pub const KP_5: SDL_Scancode
pub const KP_6: SDL_Scancode
pub const KP_7: SDL_Scancode
pub const KP_8: SDL_Scancode
pub const KP_9: SDL_Scancode
pub const KP_0: SDL_Scancode
pub const KP_PERIOD: SDL_Scancode
pub const NONUSBACKSLASH: SDL_Scancode
pub const NONUSBACKSLASH: SDL_Scancode
This is the additional key that ISO keyboards have over ANSI ones, located between left shift and Y. Produces GRAVE ACCENT and TILDE in a US or UK Mac layout, REVERSE SOLIDUS (backslash) and VERTICAL LINE in a US or UK Windows layout, and LESS-THAN SIGN and GREATER-THAN SIGN in a Swiss German, German, or French layout.
pub const APPLICATION: SDL_Scancode
pub const APPLICATION: SDL_Scancode
windows contextual menu, compose
pub const POWER: SDL_Scancode
pub const POWER: SDL_Scancode
The USB document says this is a status flag, not a physical key - but some Mac keyboards do have a power key.
pub const KP_EQUALS: SDL_Scancode
pub const F13: SDL_Scancode
pub const F14: SDL_Scancode
pub const F15: SDL_Scancode
pub const F16: SDL_Scancode
pub const F17: SDL_Scancode
pub const F18: SDL_Scancode
pub const F19: SDL_Scancode
pub const F20: SDL_Scancode
pub const F21: SDL_Scancode
pub const F22: SDL_Scancode
pub const F23: SDL_Scancode
pub const F24: SDL_Scancode
pub const EXECUTE: SDL_Scancode
pub const HELP: SDL_Scancode
pub const HELP: SDL_Scancode
AL Integrated Help Center
pub const MENU: SDL_Scancode
pub const MENU: SDL_Scancode
Menu (show menu)
pub const SELECT: SDL_Scancode
pub const STOP: SDL_Scancode
pub const STOP: SDL_Scancode
AC Stop
pub const AGAIN: SDL_Scancode
pub const AGAIN: SDL_Scancode
AC Redo/Repeat
pub const UNDO: SDL_Scancode
pub const UNDO: SDL_Scancode
AC Undo
pub const CUT: SDL_Scancode
pub const CUT: SDL_Scancode
AC Cut
pub const COPY: SDL_Scancode
pub const COPY: SDL_Scancode
AC Copy
pub const PASTE: SDL_Scancode
pub const PASTE: SDL_Scancode
AC Paste
pub const FIND: SDL_Scancode
pub const FIND: SDL_Scancode
AC Find
pub const MUTE: SDL_Scancode
pub const VOLUMEUP: SDL_Scancode
pub const VOLUMEDOWN: SDL_Scancode
pub const KP_COMMA: SDL_Scancode
pub const KP_EQUALSAS400: SDL_Scancode
pub const INTERNATIONAL1: SDL_Scancode
pub const INTERNATIONAL1: SDL_Scancode
used on Asian keyboards, see footnotes in USB doc
pub const INTERNATIONAL2: SDL_Scancode
pub const INTERNATIONAL3: SDL_Scancode
pub const INTERNATIONAL3: SDL_Scancode
Yen
pub const INTERNATIONAL4: SDL_Scancode
pub const INTERNATIONAL5: SDL_Scancode
pub const INTERNATIONAL6: SDL_Scancode
pub const INTERNATIONAL7: SDL_Scancode
pub const INTERNATIONAL8: SDL_Scancode
pub const INTERNATIONAL9: SDL_Scancode
pub const LANG1: SDL_Scancode
pub const LANG1: SDL_Scancode
Hangul/English toggle
pub const LANG2: SDL_Scancode
pub const LANG2: SDL_Scancode
Hanja conversion
pub const LANG3: SDL_Scancode
pub const LANG3: SDL_Scancode
Katakana
pub const LANG4: SDL_Scancode
pub const LANG4: SDL_Scancode
Hiragana
pub const LANG5: SDL_Scancode
pub const LANG5: SDL_Scancode
Zenkaku/Hankaku
pub const LANG6: SDL_Scancode
pub const LANG6: SDL_Scancode
reserved
pub const LANG7: SDL_Scancode
pub const LANG7: SDL_Scancode
reserved
pub const LANG8: SDL_Scancode
pub const LANG8: SDL_Scancode
reserved
pub const LANG9: SDL_Scancode
pub const LANG9: SDL_Scancode
reserved
pub const ALTERASE: SDL_Scancode
pub const ALTERASE: SDL_Scancode
Erase-Eaze
pub const SYSREQ: SDL_Scancode
pub const CANCEL: SDL_Scancode
pub const CANCEL: SDL_Scancode
AC Cancel
pub const CLEAR: SDL_Scancode
pub const PRIOR: SDL_Scancode
pub const RETURN2: SDL_Scancode
pub const SEPARATOR: SDL_Scancode
pub const OUT: SDL_Scancode
pub const OPER: SDL_Scancode
pub const CLEARAGAIN: SDL_Scancode
pub const CRSEL: SDL_Scancode
pub const EXSEL: SDL_Scancode
pub const KP_00: SDL_Scancode
pub const KP_000: SDL_Scancode
pub const THOUSANDSSEPARATOR: SDL_Scancode
pub const DECIMALSEPARATOR: SDL_Scancode
pub const CURRENCYUNIT: SDL_Scancode
pub const CURRENCYSUBUNIT: SDL_Scancode
pub const KP_LEFTPAREN: SDL_Scancode
pub const KP_RIGHTPAREN: SDL_Scancode
pub const KP_LEFTBRACE: SDL_Scancode
pub const KP_RIGHTBRACE: SDL_Scancode
pub const KP_TAB: SDL_Scancode
pub const KP_BACKSPACE: SDL_Scancode
pub const KP_A: SDL_Scancode
pub const KP_B: SDL_Scancode
pub const KP_C: SDL_Scancode
pub const KP_D: SDL_Scancode
pub const KP_E: SDL_Scancode
pub const KP_F: SDL_Scancode
pub const KP_XOR: SDL_Scancode
pub const KP_POWER: SDL_Scancode
pub const KP_PERCENT: SDL_Scancode
pub const KP_LESS: SDL_Scancode
pub const KP_GREATER: SDL_Scancode
pub const KP_AMPERSAND: SDL_Scancode
pub const KP_DBLAMPERSAND: SDL_Scancode
pub const KP_VERTICALBAR: SDL_Scancode
pub const KP_DBLVERTICALBAR: SDL_Scancode
pub const KP_COLON: SDL_Scancode
pub const KP_HASH: SDL_Scancode
pub const KP_SPACE: SDL_Scancode
pub const KP_AT: SDL_Scancode
pub const KP_EXCLAM: SDL_Scancode
pub const KP_MEMSTORE: SDL_Scancode
pub const KP_MEMRECALL: SDL_Scancode
pub const KP_MEMCLEAR: SDL_Scancode
pub const KP_MEMADD: SDL_Scancode
pub const KP_MEMSUBTRACT: SDL_Scancode
pub const KP_MEMMULTIPLY: SDL_Scancode
pub const KP_MEMDIVIDE: SDL_Scancode
pub const KP_PLUSMINUS: SDL_Scancode
pub const KP_CLEAR: SDL_Scancode
pub const KP_CLEARENTRY: SDL_Scancode
pub const KP_BINARY: SDL_Scancode
pub const KP_OCTAL: SDL_Scancode
pub const KP_DECIMAL: SDL_Scancode
pub const KP_HEXADECIMAL: SDL_Scancode
pub const LCTRL: SDL_Scancode
pub const LSHIFT: SDL_Scancode
pub const LALT: SDL_Scancode
pub const LALT: SDL_Scancode
alt, option
pub const LGUI: SDL_Scancode
pub const LGUI: SDL_Scancode
windows, command (apple), meta
pub const RCTRL: SDL_Scancode
pub const RSHIFT: SDL_Scancode
pub const RALT: SDL_Scancode
pub const RALT: SDL_Scancode
alt gr, option
pub const RGUI: SDL_Scancode
pub const RGUI: SDL_Scancode
windows, command (apple), meta
pub const MODE: SDL_Scancode
pub const MODE: SDL_Scancode
I’m not sure if this is really not covered
by any of the above, but since there’s a
special [SDL_KMOD_MODE
] for it I’m adding it here
pub const SLEEP: SDL_Scancode
pub const SLEEP: SDL_Scancode
Sleep
pub const WAKE: SDL_Scancode
pub const WAKE: SDL_Scancode
Wake
pub const CHANNEL_INCREMENT: SDL_Scancode
pub const CHANNEL_INCREMENT: SDL_Scancode
Channel Increment
pub const CHANNEL_DECREMENT: SDL_Scancode
pub const CHANNEL_DECREMENT: SDL_Scancode
Channel Decrement
pub const MEDIA_PLAY: SDL_Scancode
pub const MEDIA_PLAY: SDL_Scancode
Play
pub const MEDIA_PAUSE: SDL_Scancode
pub const MEDIA_PAUSE: SDL_Scancode
Pause
pub const MEDIA_RECORD: SDL_Scancode
pub const MEDIA_RECORD: SDL_Scancode
Record
pub const MEDIA_FAST_FORWARD: SDL_Scancode
pub const MEDIA_FAST_FORWARD: SDL_Scancode
Fast Forward
pub const MEDIA_REWIND: SDL_Scancode
pub const MEDIA_REWIND: SDL_Scancode
Rewind
pub const MEDIA_NEXT_TRACK: SDL_Scancode
pub const MEDIA_NEXT_TRACK: SDL_Scancode
Next Track
pub const MEDIA_PREVIOUS_TRACK: SDL_Scancode
pub const MEDIA_PREVIOUS_TRACK: SDL_Scancode
Previous Track
pub const MEDIA_STOP: SDL_Scancode
pub const MEDIA_STOP: SDL_Scancode
Stop
pub const MEDIA_EJECT: SDL_Scancode
pub const MEDIA_EJECT: SDL_Scancode
Eject
pub const MEDIA_PLAY_PAUSE: SDL_Scancode
pub const MEDIA_PLAY_PAUSE: SDL_Scancode
Play / Pause
pub const MEDIA_SELECT: SDL_Scancode
pub const AC_NEW: SDL_Scancode
pub const AC_NEW: SDL_Scancode
AC New
pub const AC_OPEN: SDL_Scancode
pub const AC_OPEN: SDL_Scancode
AC Open
pub const AC_CLOSE: SDL_Scancode
pub const AC_CLOSE: SDL_Scancode
AC Close
pub const AC_EXIT: SDL_Scancode
pub const AC_EXIT: SDL_Scancode
AC Exit
pub const AC_SAVE: SDL_Scancode
pub const AC_SAVE: SDL_Scancode
AC Save
pub const AC_PRINT: SDL_Scancode
pub const AC_PRINT: SDL_Scancode
AC Print
pub const AC_PROPERTIES: SDL_Scancode
pub const AC_PROPERTIES: SDL_Scancode
AC Properties
pub const AC_SEARCH: SDL_Scancode
pub const AC_SEARCH: SDL_Scancode
AC Search
pub const AC_HOME: SDL_Scancode
pub const AC_HOME: SDL_Scancode
AC Home
pub const AC_BACK: SDL_Scancode
pub const AC_BACK: SDL_Scancode
AC Back
pub const AC_FORWARD: SDL_Scancode
pub const AC_FORWARD: SDL_Scancode
AC Forward
pub const AC_STOP: SDL_Scancode
pub const AC_STOP: SDL_Scancode
AC Stop
pub const AC_REFRESH: SDL_Scancode
pub const AC_REFRESH: SDL_Scancode
AC Refresh
pub const AC_BOOKMARKS: SDL_Scancode
pub const AC_BOOKMARKS: SDL_Scancode
AC Bookmarks
pub const SOFTLEFT: SDL_Scancode
pub const SOFTLEFT: SDL_Scancode
Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom left of the display.
pub const SOFTRIGHT: SDL_Scancode
pub const SOFTRIGHT: SDL_Scancode
Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom right of the display.
pub const CALL: SDL_Scancode
pub const CALL: SDL_Scancode
Used for accepting phone calls.
pub const ENDCALL: SDL_Scancode
pub const ENDCALL: SDL_Scancode
Used for rejecting phone calls.
pub const RESERVED: SDL_Scancode
pub const RESERVED: SDL_Scancode
400-500 reserved for dynamic keycodes
pub const COUNT: SDL_Scancode
pub const COUNT: SDL_Scancode
not a key, just marks the number of scancodes for array bounds
Trait Implementations§
§impl Clone for SDL_Scancode
impl Clone for SDL_Scancode
§fn clone(&self) -> SDL_Scancode
fn clone(&self) -> SDL_Scancode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Default for SDL_Scancode
impl Default for SDL_Scancode
§fn default() -> SDL_Scancode
fn default() -> SDL_Scancode
§impl From<SDL_Scancode> for i32
impl From<SDL_Scancode> for i32
§fn from(value: SDL_Scancode) -> i32
fn from(value: SDL_Scancode) -> i32
§impl From<Scancode> for SDL_Scancode
impl From<Scancode> for SDL_Scancode
§fn from(scancode: Scancode) -> SDL_Scancode
fn from(scancode: Scancode) -> SDL_Scancode
§impl Hash for SDL_Scancode
impl Hash for SDL_Scancode
§impl Ord for SDL_Scancode
impl Ord for SDL_Scancode
§impl PartialEq for SDL_Scancode
impl PartialEq for SDL_Scancode
§impl PartialOrd for SDL_Scancode
impl PartialOrd for SDL_Scancode
impl Copy for SDL_Scancode
impl Eq for SDL_Scancode
impl StructuralPartialEq for SDL_Scancode
Auto Trait Implementations§
impl Freeze for SDL_Scancode
impl RefUnwindSafe for SDL_Scancode
impl Send for SDL_Scancode
impl Sync for SDL_Scancode
impl Unpin for SDL_Scancode
impl UnwindSafe for SDL_Scancode
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
Source§impl<T> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Source§fn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T, R> Chain<R> for Twhere
T: ?Sized,
impl<T, R> Chain<R> for Twhere
T: ?Sized,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> ExtAny for T
impl<T> ExtAny for T
Source§fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId
of Self
using a custom hasher.Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§impl<T> ExtMem for Twhere
T: ?Sized,
impl<T> ExtMem for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Source§fn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Source§fn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Source§fn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Source§fn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true
if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self
without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
unsafe_slice
only.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Hook for T
impl<T> Hook for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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