pub enum ValueKey {
String(StringB),
Number(usize),
}Expand description
Re-exports from the valu3 library for convenient access to value conversion traits.
§Examples
use quickleaf::prelude::*;
let mut cache = Quickleaf::new(10);
// ToValueBehavior trait is available from the prelude
cache.insert("number", 42);
cache.insert("string", "hello");
cache.insert("boolean", true);
assert_eq!(cache.get("number"), Some(&42.to_value()));
assert_eq!(cache.get("string"), Some(&"hello".to_value()));
assert_eq!(cache.get("boolean"), Some(&true.to_value()));Variants§
Implementations§
Trait Implementations§
Source§impl<'a> FromIterator<&'a ValueKey> for ValueKey
impl<'a> FromIterator<&'a ValueKey> for ValueKey
Source§impl Ord for ValueKey
impl Ord for ValueKey
Source§impl PartialOrd for ValueKey
impl PartialOrd for ValueKey
impl Eq for ValueKey
impl StructuralPartialEq for ValueKey
Auto Trait Implementations§
impl Freeze for ValueKey
impl RefUnwindSafe for ValueKey
impl Send for ValueKey
impl Sync for ValueKey
impl Unpin for ValueKey
impl UnwindSafe for ValueKey
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.