]>
git.proxmox.com Git - proxmox-backup.git/blob - src/static_map.rs
2 pub struct StaticMap
<'a
, K
, V
> {
3 pub entries
: &'a
[(K
,V
)],
6 impl<'a
, K
: Eq
, V
> StaticMap
<'a
, K
, V
> {
9 pub fn len(&self) -> usize {
13 pub fn get(&self, key
: &K
) -> Option
<&V
> {
14 for (ref k
, ref v
) in self.entries
{
15 if k
== key { return Some(v) }