pub struct Layout { /* private fields */ }Expand description
A complete set of key bindings the player can pick: one entry of
layouts in the keymap file, named by its id. The file decides which
layouts there are; this is only the name, kept inline so a layout is
Copy. Names are ASCII letters, digits and _, at most
LAYOUT_NAME_MAX bytes (RightHanded).
Implementations§
Source§impl Layout
impl Layout
Sourcepub const fn named(name: &'static str) -> Layout
pub const fn named(name: &'static str) -> Layout
The layout named name, for a game’s constants. Fails to compile in
a const (panics elsewhere) if name isn’t a valid name.
Trait Implementations§
impl Copy for Layout
Source§impl<'de> Deserialize<'de> for Layout
impl<'de> Deserialize<'de> for Layout
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Layout, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Layout, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Layout
Source§impl Ord for Layout
impl Ord for Layout
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Layout
impl PartialOrd for Layout
Source§impl Serialize for Layout
A layout’s binary form (a baked keymap, pack) is its name.
impl Serialize for Layout
A layout’s binary form (a baked keymap, pack) is its name.
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
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 StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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
Mutably borrows from an owned value. Read more