hir_def::dyn_map

Trait Policy

source
pub trait Policy {
    type K;
    type V;

    // Required methods
    fn insert(map: &mut DynMap, key: Self::K, value: Self::V);
    fn get<'a>(map: &'a DynMap, key: &Self::K) -> Option<&'a Self::V>;
    fn is_empty(map: &DynMap) -> bool;
}

Required Associated Types§

source

type K

source

type V

Required Methods§

source

fn insert(map: &mut DynMap, key: Self::K, value: Self::V)

source

fn get<'a>(map: &'a DynMap, key: &Self::K) -> Option<&'a Self::V>

source

fn is_empty(map: &DynMap) -> bool

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<K: Hash + Eq + 'static, V: 'static> Policy for (K, V)

source§

type K = K

source§

type V = V

source§

fn insert(map: &mut DynMap, key: K, value: V)

source§

fn get<'a>(map: &'a DynMap, key: &K) -> Option<&'a V>

source§

fn is_empty(map: &DynMap) -> bool

Implementors§

source§

impl<AST: AstNode + 'static, ID: 'static> Policy for AstPtrPolicy<AST, ID>

source§

type K = AstPtr<AST>

source§

type V = ID