pub struct Key<T> {
pub name: &'static str,
pub default: T,
}Expand description
A typed setting key that carries its value type at compile time. This ensures type-safe access to settings - you can only get/set values of the correct type for each key.
Fields§
§name: &'static str§default: TImplementations§
Auto Trait Implementations§
impl<T> Freeze for Key<T>where
T: Freeze,
impl<T> RefUnwindSafe for Key<T>where
T: RefUnwindSafe,
impl<T> Send for Key<T>where
T: Send,
impl<T> Sync for Key<T>where
T: Sync,
impl<T> Unpin for Key<T>where
T: Unpin,
impl<T> UnsafeUnpin for Key<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Key<T>where
T: 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