ExecSpecSetInsert

Trait ExecSpecSetInsert 

Source
pub trait ExecSpecSetInsert<'a, Out: Sized + DeepView>:
    Sized
    + DeepView
    + ToOwned<Out> {
    type Elem: DeepView + DeepViewClone;

    // Required method
    exec fn exec_insert(self, a: Self::Elem) -> Out;
}
Expand description

Spec for executable version of Set::insert.

Required Associated Types§

Required Methods§

Source

exec fn exec_insert(self, a: Self::Elem) -> 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> ExecSpecSetInsert<'a, HashSet<K>> for &'a HashSet<K>
where K: DeepView + DeepViewClone + Hash + Eq,

Source§

exec fn exec_insert(self, a: Self::Elem) -> res : HashSet<K>

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

type Elem = K

Implementors§