ExecSpecMapInsert

Trait ExecSpecMapInsert 

Source
pub trait ExecSpecMapInsert<'a, Out: Sized + DeepView>:
    Sized
    + DeepView
    + ToOwned<Out> {
    type Key: DeepView + DeepViewClone;
    type Value: DeepView + DeepViewClone;

    // Required method
    exec fn exec_insert(self, key: Self::Key, value: Self::Value) -> Out;
}
Expand description

Spec for executable version of Map::insert.

Required Associated Types§

Required Methods§

Source

exec fn exec_insert(self, key: Self::Key, value: Self::Value) -> Out

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

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

Source§

exec fn exec_insert(self, key: Self::Key, value: Self::Value) -> res : HashMap<K, V>

ensures
res.deep_view() =~= self.deep_view().insert(key.deep_view(), value.deep_view()),
Source§

type Key = K

Source§

type Value = V

Implementors§