Skip to main content

OccupiedEntrySpecFns

Trait OccupiedEntrySpecFns 

Source
pub trait OccupiedEntrySpecFns<K, V, A>: Sized {
    // Required methods
    spec fn spec_key(self) -> K;
    spec fn value(self) -> V;
    spec fn final_value(self) -> Option<V>;
}
Expand description

Specification for an OccupiedEntry. Contains the current key and value in the entry, and prophesies the final value after this instantiation of the entry API is complete. The final value is optional, since the user might choose to remove the entry.

Required Methods§

Source

spec fn spec_key(self) -> K

Source

spec fn value(self) -> V

Source

spec fn final_value(self) -> Option<V>

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, A: Allocator> OccupiedEntrySpecFns<K, V, A> for OccupiedEntry<'a, K, V, A>

Source§

uninterp spec fn spec_key(self) -> K

Source§

uninterp spec fn value(self) -> V

Source§

uninterp spec fn final_value(self) -> Option<V>

Implementors§