pub struct OptionHandle<T: OptionType> { /* private fields */ }Expand description
Typed pointer into the registry. Returned by
crate::ConfigRegistry::register; passed back to
crate::ConfigRegistry::get / crate::ConfigRegistry::set
for type-safe access without string lookups.
Copy so callers can stash handles as plain fields and pass
them around freely. Internally an opaque index +
std::marker::PhantomData<T> – the registry validates the
index on each access.
Implementations§
Source§impl<T: OptionType> OptionHandle<T>
impl<T: OptionType> OptionHandle<T>
Trait Implementations§
Source§impl<T: OptionType> Clone for OptionHandle<T>
impl<T: OptionType> Clone for OptionHandle<T>
impl<T: OptionType> Copy for OptionHandle<T>
Source§impl<T: OptionType> Debug for OptionHandle<T>
impl<T: OptionType> Debug for OptionHandle<T>
impl<T: OptionType> Eq for OptionHandle<T>
Auto Trait Implementations§
impl<T> Freeze for OptionHandle<T>
impl<T> RefUnwindSafe for OptionHandle<T>
impl<T> Send for OptionHandle<T>
impl<T> Sync for OptionHandle<T>
impl<T> Unpin for OptionHandle<T>
impl<T> UnsafeUnpin for OptionHandle<T>
impl<T> UnwindSafe for OptionHandle<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.