pub struct LayeredKey<R: Copy + Debug + PartialEq> {
pub base: R,
pub layered: [Option<R>; 8],
}
Expand description
A key whose behavior depends on which layer is active.
Fields§
§base: R
The base key, used when no layers are active.
layered: [Option<R>; 8]
The layered keys, used when the corresponding layer is active.
Implementations§
Trait Implementations§
Source§impl<R: Clone + Copy + Debug + PartialEq> Clone for LayeredKey<R>
impl<R: Clone + Copy + Debug + PartialEq> Clone for LayeredKey<R>
Source§fn clone(&self) -> LayeredKey<R>
fn clone(&self) -> LayeredKey<R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de, R> Deserialize<'de> for LayeredKey<R>
impl<'de, R> Deserialize<'de> for LayeredKey<R>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<R: Copy + Copy + Debug + PartialEq> Copy for LayeredKey<R>
impl<R: Copy + Debug + PartialEq> StructuralPartialEq for LayeredKey<R>
Auto Trait Implementations§
impl<R> Freeze for LayeredKey<R>where
R: Freeze,
impl<R> RefUnwindSafe for LayeredKey<R>where
R: RefUnwindSafe,
impl<R> Send for LayeredKey<R>where
R: Send,
impl<R> Sync for LayeredKey<R>where
R: Sync,
impl<R> Unpin for LayeredKey<R>where
R: Unpin,
impl<R> UnwindSafe for LayeredKey<R>where
R: UnwindSafe,
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