pub struct CustomEnvKey<T: KeyValue = i64> { /* private fields */ }Expand description
A registered environment key: the conformance, the key path, and the default.
Generic over what it holds. The type is fixed when the key is made, which is
what lets environment_value and
EnvironmentValues::value_for
be checked rather than trusted — reading a String key as an Int is a
compile error here and a reinterpreted pointer in Swift.
Auto Trait Implementations§
impl<T> Freeze for CustomEnvKey<T>
impl<T> RefUnwindSafe for CustomEnvKey<T>
impl<T> Send for CustomEnvKey<T>
impl<T> Sync for CustomEnvKey<T>
impl<T> Unpin for CustomEnvKey<T>
impl<T> UnsafeUnpin for CustomEnvKey<T>
impl<T> UnwindSafe for CustomEnvKey<T>
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