Skip to main content

ExecSpecMapGet

Trait ExecSpecMapGet 

Source
pub trait ExecSpecMapGet<'a>: Sized + DeepView {
    type Key: DeepView + DeepViewClone;
    type Value: DeepView + DeepViewClone;

    // Required method
    exec fn exec_get(self, k: Self::Key) -> Option<Self::Value>;
}
Expand description

Spec for executable version of Map::get.

Required Associated Types§

Required Methods§

Source

exec fn exec_get(self, k: Self::Key) -> Option<Self::Value>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, K, V> ExecSpecMapGet<'a> for &'a HashMap<K, V>

Source§

exec fn exec_get(self, k: Self::Key) -> res : Option<Self::Value>

ensures
match (res, self.deep_view().get(k.deep_view())) {
    (Some(v1), Some(v2)) => v1.deep_view() == v2,
    (None, None) => true,
    (_, _) => false,
},
Source§

type Key = K

Source§

type Value = V

Implementors§