Struct rute::auto::rute_enums::Key
source · pub struct Key { /* private fields */ }
Implementations
sourceimpl Key
impl Key
pub const KeyEscape: Self = _
pub const KeyTab: Self = _
pub const KeyBacktab: Self = _
pub const KeyBackspace: Self = _
pub const KeyReturn: Self = _
pub const KeyEnter: Self = _
pub const KeyInsert: Self = _
pub const KeyDelete: Self = _
pub const KeyPause: Self = _
pub const KeyPrint: Self = _
pub const KeySysReq: Self = _
pub const KeyClear: Self = _
pub const KeyHome: Self = _
pub const KeyEnd: Self = _
pub const KeyLeft: Self = _
pub const KeyUp: Self = _
pub const KeyRight: Self = _
pub const KeyDown: Self = _
pub const KeyPageUp: Self = _
pub const KeyPageDown: Self = _
pub const KeyShift: Self = _
pub const KeyControl: Self = _
pub const KeyMeta: Self = _
pub const KeyAlt: Self = _
pub const KeyCapsLock: Self = _
pub const KeyNumLock: Self = _
pub const KeyScrollLock: Self = _
pub const KeyF1: Self = _
pub const KeyF2: Self = _
pub const KeyF3: Self = _
pub const KeyF4: Self = _
pub const KeyF5: Self = _
pub const KeyF6: Self = _
pub const KeyF7: Self = _
pub const KeyF8: Self = _
pub const KeyF9: Self = _
pub const KeyF10: Self = _
pub const KeyF11: Self = _
pub const KeyF12: Self = _
pub const KeyF13: Self = _
pub const KeyF14: Self = _
pub const KeyF15: Self = _
pub const KeyF16: Self = _
pub const KeyF17: Self = _
pub const KeyF18: Self = _
pub const KeyF19: Self = _
pub const KeyF20: Self = _
pub const KeyF21: Self = _
pub const KeyF22: Self = _
pub const KeyF23: Self = _
pub const KeyF24: Self = _
pub const KeyF25: Self = _
pub const KeyF26: Self = _
pub const KeyF27: Self = _
pub const KeyF28: Self = _
pub const KeyF29: Self = _
pub const KeyF30: Self = _
pub const KeyF31: Self = _
pub const KeyF32: Self = _
pub const KeyF33: Self = _
pub const KeyF34: Self = _
pub const KeyF35: Self = _
pub const KeySuperL: Self = _
pub const KeySuperR: Self = _
pub const KeyMenu: Self = _
pub const KeyHyperL: Self = _
pub const KeyHyperR: Self = _
pub const KeyHelp: Self = _
pub const KeyDirectionL: Self = _
pub const KeyDirectionR: Self = _
pub const KeySpace: Self = _
pub const KeyAny: Self = _
pub const KeyExclam: Self = _
pub const KeyQuoteDbl: Self = _
pub const KeyNumberSign: Self = _
pub const KeyDollar: Self = _
pub const KeyPercent: Self = _
pub const KeyAmpersand: Self = _
pub const KeyApostrophe: Self = _
pub const KeyParenLeft: Self = _
pub const KeyParenRight: Self = _
pub const KeyAsterisk: Self = _
pub const KeyPlus: Self = _
pub const KeyComma: Self = _
pub const KeyMinus: Self = _
pub const KeyPeriod: Self = _
pub const KeySlash: Self = _
pub const Key0: Self = _
pub const Key1: Self = _
pub const Key2: Self = _
pub const Key3: Self = _
pub const Key4: Self = _
pub const Key5: Self = _
pub const Key6: Self = _
pub const Key7: Self = _
pub const Key8: Self = _
pub const Key9: Self = _
pub const KeyColon: Self = _
pub const KeySemicolon: Self = _
pub const KeyLess: Self = _
pub const KeyEqual: Self = _
pub const KeyGreater: Self = _
pub const KeyQuestion: Self = _
pub const KeyAt: Self = _
pub const KeyA: Self = _
pub const KeyB: Self = _
pub const KeyC: Self = _
pub const KeyD: Self = _
pub const KeyE: Self = _
pub const KeyF: Self = _
pub const KeyG: Self = _
pub const KeyH: Self = _
pub const KeyI: Self = _
pub const KeyJ: Self = _
pub const KeyK: Self = _
pub const KeyL: Self = _
pub const KeyM: Self = _
pub const KeyN: Self = _
pub const KeyO: Self = _
pub const KeyP: Self = _
pub const KeyQ: Self = _
pub const KeyR: Self = _
pub const KeyS: Self = _
pub const KeyT: Self = _
pub const KeyU: Self = _
pub const KeyV: Self = _
pub const KeyW: Self = _
pub const KeyX: Self = _
pub const KeyY: Self = _
pub const KeyZ: Self = _
pub const KeyBracketLeft: Self = _
pub const KeyBackslash: Self = _
pub const KeyBracketRight: Self = _
pub const KeyAsciiCircum: Self = _
pub const KeyUnderscore: Self = _
pub const KeyQuoteLeft: Self = _
pub const KeyBraceLeft: Self = _
pub const KeyBar: Self = _
pub const KeyBraceRight: Self = _
pub const KeyAsciiTilde: Self = _
pub const KeyNobreakspace: Self = _
pub const KeyExclamdown: Self = _
pub const KeyCent: Self = _
pub const KeySterling: Self = _
pub const KeyCurrency: Self = _
pub const KeyYen: Self = _
pub const KeyBrokenbar: Self = _
pub const KeySection: Self = _
pub const KeyDiaeresis: Self = _
pub const KeyCopyright: Self = _
pub const KeyOrdfeminine: Self = _
pub const KeyGuillemotleft: Self = _
pub const KeyNotsign: Self = _
pub const KeyHyphen: Self = _
pub const KeyRegistered: Self = _
pub const KeyMacron: Self = _
pub const KeyDegree: Self = _
pub const KeyPlusminus: Self = _
pub const KeyTwosuperior: Self = _
pub const KeyThreesuperior: Self = _
pub const KeyAcute: Self = _
pub const KeyMu: Self = _
pub const KeyParagraph: Self = _
pub const KeyPeriodcentered: Self = _
pub const KeyCedilla: Self = _
pub const KeyOnesuperior: Self = _
pub const KeyMasculine: Self = _
pub const KeyGuillemotright: Self = _
pub const KeyOnequarter: Self = _
pub const KeyOnehalf: Self = _
pub const KeyThreequarters: Self = _
pub const KeyQuestiondown: Self = _
pub const KeyAgrave: Self = _
pub const KeyAacute: Self = _
pub const KeyAcircumflex: Self = _
pub const KeyAtilde: Self = _
pub const KeyAdiaeresis: Self = _
pub const KeyAring: Self = _
pub const KeyAe: Self = _
pub const KeyCcedilla: Self = _
pub const KeyEgrave: Self = _
pub const KeyEacute: Self = _
pub const KeyEcircumflex: Self = _
pub const KeyEdiaeresis: Self = _
pub const KeyIgrave: Self = _
pub const KeyIacute: Self = _
pub const KeyIcircumflex: Self = _
pub const KeyIdiaeresis: Self = _
pub const KeyEth: Self = _
pub const KeyNtilde: Self = _
pub const KeyOgrave: Self = _
pub const KeyOacute: Self = _
pub const KeyOcircumflex: Self = _
pub const KeyOtilde: Self = _
pub const KeyOdiaeresis: Self = _
pub const KeyMultiply: Self = _
pub const KeyOoblique: Self = _
pub const KeyUgrave: Self = _
pub const KeyUacute: Self = _
pub const KeyUcircumflex: Self = _
pub const KeyUdiaeresis: Self = _
pub const KeyYacute: Self = _
pub const KeyThorn: Self = _
pub const KeySsharp: Self = _
pub const KeyDivision: Self = _
pub const KeyYdiaeresis: Self = _
pub const KeyAltGr: Self = _
pub const KeyMultiKey: Self = _
pub const KeyCodeinput: Self = _
pub const KeySingleCandidate: Self = _
pub const KeyMultipleCandidate: Self = _
pub const KeyPreviousCandidate: Self = _
pub const KeyModeSwitch: Self = _
pub const KeyKanji: Self = _
pub const KeyMuhenkan: Self = _
pub const KeyHenkan: Self = _
pub const KeyRomaji: Self = _
pub const KeyHiragana: Self = _
pub const KeyKatakana: Self = _
pub const KeyHiraganaKatakana: Self = _
pub const KeyZenkaku: Self = _
pub const KeyHankaku: Self = _
pub const KeyZenkakuHankaku: Self = _
pub const KeyTouroku: Self = _
pub const KeyMassyo: Self = _
pub const KeyKanaLock: Self = _
pub const KeyKanaShift: Self = _
pub const KeyEisuShift: Self = _
pub const KeyEisuToggle: Self = _
pub const KeyHangul: Self = _
pub const KeyHangulStart: Self = _
pub const KeyHangulEnd: Self = _
pub const KeyHangulHanja: Self = _
pub const KeyHangulJamo: Self = _
pub const KeyHangulRomaja: Self = _
pub const KeyHangulJeonja: Self = _
pub const KeyHangulBanja: Self = _
pub const KeyHangulPreHanja: Self = _
pub const KeyHangulPostHanja: Self = _
pub const KeyHangulSpecial: Self = _
pub const KeyDeadGrave: Self = _
pub const KeyDeadAcute: Self = _
pub const KeyDeadCircumflex: Self = _
pub const KeyDeadTilde: Self = _
pub const KeyDeadMacron: Self = _
pub const KeyDeadBreve: Self = _
pub const KeyDeadAbovedot: Self = _
pub const KeyDeadDiaeresis: Self = _
pub const KeyDeadAbovering: Self = _
pub const KeyDeadDoubleacute: Self = _
pub const KeyDeadCaron: Self = _
pub const KeyDeadCedilla: Self = _
pub const KeyDeadOgonek: Self = _
pub const KeyDeadIota: Self = _
pub const KeyDeadVoicedSound: Self = _
pub const KeyDeadSemivoicedSound: Self = _
pub const KeyDeadBelowdot: Self = _
pub const KeyDeadHook: Self = _
pub const KeyDeadHorn: Self = _
pub const KeyDeadStroke: Self = _
pub const KeyDeadAbovecomma: Self = _
pub const KeyDeadAbovereversedcomma: Self = _
pub const KeyDeadDoublegrave: Self = _
pub const KeyDeadBelowring: Self = _
pub const KeyDeadBelowmacron: Self = _
pub const KeyDeadBelowcircumflex: Self = _
pub const KeyDeadBelowtilde: Self = _
pub const KeyDeadBelowbreve: Self = _
pub const KeyDeadBelowdiaeresis: Self = _
pub const KeyDeadInvertedbreve: Self = _
pub const KeyDeadBelowcomma: Self = _
pub const KeyDeadCurrency: Self = _
pub const KeyDeadA: Self = _
pub const KeyDeadE: Self = _
pub const KeyDeadI: Self = _
pub const KeyDeadO: Self = _
pub const KeyDeadU: Self = _
pub const KeyDeadSmallSchwa: Self = _
pub const KeyDeadCapitalSchwa: Self = _
pub const KeyDeadGreek: Self = _
pub const KeyDeadLowline: Self = _
pub const KeyDeadAboveverticalline: Self = _
pub const KeyDeadBelowverticalline: Self = _
pub const KeyDeadLongsolidusoverlay: Self = _
pub const KeyBack: Self = _
pub const KeyForward: Self = _
pub const KeyStop: Self = _
pub const KeyRefresh: Self = _
pub const KeyVolumeDown: Self = _
pub const KeyVolumeMute: Self = _
pub const KeyVolumeUp: Self = _
pub const KeyBassBoost: Self = _
pub const KeyBassUp: Self = _
pub const KeyBassDown: Self = _
pub const KeyTrebleUp: Self = _
pub const KeyTrebleDown: Self = _
pub const KeyMediaPlay: Self = _
pub const KeyMediaStop: Self = _
pub const KeyMediaPrevious: Self = _
pub const KeyMediaNext: Self = _
pub const KeyMediaRecord: Self = _
pub const KeyMediaPause: Self = _
pub const KeyMediaTogglePlayPause: Self = _
pub const KeyHomePage: Self = _
pub const KeyFavorites: Self = _
pub const KeySearch: Self = _
pub const KeyStandby: Self = _
pub const KeyOpenUrl: Self = _
pub const KeyLaunchMail: Self = _
pub const KeyLaunchMedia: Self = _
pub const KeyLaunch0: Self = _
pub const KeyLaunch1: Self = _
pub const KeyLaunch2: Self = _
pub const KeyLaunch3: Self = _
pub const KeyLaunch4: Self = _
pub const KeyLaunch5: Self = _
pub const KeyLaunch6: Self = _
pub const KeyLaunch7: Self = _
pub const KeyLaunch8: Self = _
pub const KeyLaunch9: Self = _
pub const KeyLaunchA: Self = _
pub const KeyLaunchB: Self = _
pub const KeyLaunchC: Self = _
pub const KeyLaunchD: Self = _
pub const KeyLaunchE: Self = _
pub const KeyLaunchF: Self = _
pub const KeyMonBrightnessUp: Self = _
pub const KeyMonBrightnessDown: Self = _
pub const KeyKeyboardLightOnOff: Self = _
pub const KeyKeyboardBrightnessUp: Self = _
pub const KeyKeyboardBrightnessDown: Self = _
pub const KeyPowerOff: Self = _
pub const KeyWakeUp: Self = _
pub const KeyEject: Self = _
pub const KeyScreenSaver: Self = _
pub const KeyWww: Self = _
pub const KeyMemo: Self = _
pub const KeyLightBulb: Self = _
pub const KeyShop: Self = _
pub const KeyHistory: Self = _
pub const KeyAddFavorite: Self = _
pub const KeyHotLinks: Self = _
pub const KeyBrightnessAdjust: Self = _
pub const KeyFinance: Self = _
pub const KeyCommunity: Self = _
pub const KeyAudioRewind: Self = _
pub const KeyBackForward: Self = _
pub const KeyApplicationLeft: Self = _
pub const KeyApplicationRight: Self = _
pub const KeyBook: Self = _
pub const KeyCd: Self = _
pub const KeyCalculator: Self = _
pub const KeyToDoList: Self = _
pub const KeyClearGrab: Self = _
pub const KeyClose: Self = _
pub const KeyCopy: Self = _
pub const KeyCut: Self = _
pub const KeyDisplay: Self = _
pub const KeyDos: Self = _
pub const KeyDocuments: Self = _
pub const KeyExcel: Self = _
pub const KeyExplorer: Self = _
pub const KeyGame: Self = _
pub const KeyGo: Self = _
pub const KeyITouch: Self = _
pub const KeyLogOff: Self = _
pub const KeyMarket: Self = _
pub const KeyMeeting: Self = _
pub const KeyMenuKb: Self = _
pub const KeyMenuPb: Self = _
pub const KeyMySites: Self = _
pub const KeyNews: Self = _
pub const KeyOfficeHome: Self = _
pub const KeyOption: Self = _
pub const KeyPaste: Self = _
pub const KeyPhone: Self = _
pub const KeyCalendar: Self = _
pub const KeyReply: Self = _
pub const KeyReload: Self = _
pub const KeyRotateWindows: Self = _
pub const KeyRotationPb: Self = _
pub const KeyRotationKb: Self = _
pub const KeySave: Self = _
pub const KeySend: Self = _
pub const KeySpell: Self = _
pub const KeySplitScreen: Self = _
pub const KeySupport: Self = _
pub const KeyTaskPane: Self = _
pub const KeyTerminal: Self = _
pub const KeyTools: Self = _
pub const KeyTravel: Self = _
pub const KeyVideo: Self = _
pub const KeyWord: Self = _
pub const KeyXfer: Self = _
pub const KeyZoomIn: Self = _
pub const KeyZoomOut: Self = _
pub const KeyAway: Self = _
pub const KeyMessenger: Self = _
pub const KeyWebCam: Self = _
pub const KeyMailForward: Self = _
pub const KeyPictures: Self = _
pub const KeyMusic: Self = _
pub const KeyBattery: Self = _
pub const KeyBluetooth: Self = _
pub const KeyWlan: Self = _
pub const KeyUwb: Self = _
pub const KeyAudioForward: Self = _
pub const KeyAudioRepeat: Self = _
pub const KeyAudioRandomPlay: Self = _
pub const KeySubtitle: Self = _
pub const KeyAudioCycleTrack: Self = _
pub const KeyTime: Self = _
pub const KeyHibernate: Self = _
pub const KeyView: Self = _
pub const KeyTopMenu: Self = _
pub const KeyPowerDown: Self = _
pub const KeySuspend: Self = _
pub const KeyContrastAdjust: Self = _
pub const KeyLaunchG: Self = _
pub const KeyLaunchH: Self = _
pub const KeyTouchpadToggle: Self = _
pub const KeyTouchpadOn: Self = _
pub const KeyTouchpadOff: Self = _
pub const KeyMicMute: Self = _
pub const KeyRed: Self = _
pub const KeyGreen: Self = _
pub const KeyYellow: Self = _
pub const KeyBlue: Self = _
pub const KeyChannelUp: Self = _
pub const KeyChannelDown: Self = _
pub const KeyGuide: Self = _
pub const KeyInfo: Self = _
pub const KeySettings: Self = _
pub const KeyMicVolumeUp: Self = _
pub const KeyMicVolumeDown: Self = _
pub const KeyNew: Self = _
pub const KeyOpen: Self = _
pub const KeyFind: Self = _
pub const KeyUndo: Self = _
pub const KeyRedo: Self = _
pub const KeyMediaLast: Self = _
pub const KeySelect: Self = _
pub const KeyYes: Self = _
pub const KeyNo: Self = _
pub const KeyCancel: Self = _
pub const KeyPrinter: Self = _
pub const KeyExecute: Self = _
pub const KeySleep: Self = _
pub const KeyPlay: Self = _
pub const KeyZoom: Self = _
pub const KeyExit: Self = _
pub const KeyContext1: Self = _
pub const KeyContext2: Self = _
pub const KeyContext3: Self = _
pub const KeyContext4: Self = _
pub const KeyCall: Self = _
pub const KeyHangup: Self = _
pub const KeyFlip: Self = _
pub const KeyToggleCallHangup: Self = _
pub const KeyVoiceDial: Self = _
pub const KeyLastNumberRedial: Self = _
pub const KeyCamera: Self = _
pub const KeyCameraFocus: Self = _
pub const KeyUnknown: Self = _
sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> Self
pub const unsafe fn from_bits_unchecked(bits: u32) -> Self
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Returns true
if all of the flags in other
are contained within self
.
sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Inserts or removes the specified flags depending on the passed value.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations
sourceimpl BitAndAssign<Key> for Key
impl BitAndAssign<Key> for Key
sourcefn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Disables all flags disabled in the set.
sourceimpl BitOrAssign<Key> for Key
impl BitOrAssign<Key> for Key
sourcefn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Adds the set of flags.
sourceimpl BitXorAssign<Key> for Key
impl BitXorAssign<Key> for Key
sourcefn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Toggles the set of flags.
sourceimpl Extend<Key> for Key
impl Extend<Key> for Key
sourcefn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)sourceimpl FromIterator<Key> for Key
impl FromIterator<Key> for Key
sourcefn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
sourceimpl Ord for Key
impl Ord for Key
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialOrd<Key> for Key
impl PartialOrd<Key> for Key
sourcefn partial_cmp(&self, other: &Key) -> Option<Ordering>
fn partial_cmp(&self, other: &Key) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresourceimpl SubAssign<Key> for Key
impl SubAssign<Key> for Key
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Disables all flags enabled in the set.