pub struct LookupMap<K1, K2, V>{
pub logger: Logger,
/* private fields */
}Expand description
A special case of crate::lookup::LookupTable where the value of the HashMap is another HashMap<K2, V>.
Fields§
§logger: LoggerImplementations§
Source§impl<K1, K2, V> LookupMap<K1, K2, V>where
K1: Hash + Eq + Serialize + DeserializeOwned,
K2: Hash + Eq + Serialize + DeserializeOwned,
V: Serialize + DeserializeOwned,
impl<K1, K2, V> LookupMap<K1, K2, V>where
K1: Hash + Eq + Serialize + DeserializeOwned,
K2: Hash + Eq + Serialize + DeserializeOwned,
V: Serialize + DeserializeOwned,
pub fn insert(&mut self, k1: K1, k2: K2, v: V) -> DbResult<Option<V>>
pub fn create_key(&mut self, key: K1) -> DbResult<Option<HashMap<K2, V>>>
pub fn remove(&mut self, k1: &K1, k2: &K2) -> DbResult<Option<V>>
pub fn clear_key(&mut self, k1: &K1) -> DbResult<Option<HashMap<K2, V>>>
pub fn get(&self) -> &HashMap<K1, HashMap<K2, V>>
pub fn clear(&mut self) -> DbResult<()>
Trait Implementations§
Source§impl<K1, K2, V> Table for LookupMap<K1, K2, V>where
K1: Hash + Eq + Serialize + DeserializeOwned,
K2: Hash + Eq + Serialize + DeserializeOwned,
V: Serialize + DeserializeOwned,
impl<K1, K2, V> Table for LookupMap<K1, K2, V>where
K1: Hash + Eq + Serialize + DeserializeOwned,
K2: Hash + Eq + Serialize + DeserializeOwned,
V: Serialize + DeserializeOwned,
Auto Trait Implementations§
impl<K1, K2, V> Freeze for LookupMap<K1, K2, V>
impl<K1, K2, V> RefUnwindSafe for LookupMap<K1, K2, V>
impl<K1, K2, V> Send for LookupMap<K1, K2, V>
impl<K1, K2, V> Sync for LookupMap<K1, K2, V>
impl<K1, K2, V> Unpin for LookupMap<K1, K2, V>
impl<K1, K2, V> UnwindSafe for LookupMap<K1, K2, V>
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