Trait vstd::storage_protocol::Protocol
source · pub trait Protocol<K, V>: Sized {
// Required methods
spec fn op(self, other: Self) -> Self;
spec fn rel(self, s: Map<K, V>) -> bool;
spec fn unit() -> Self;
proof fn commutative(a: Self, b: Self);
proof fn associative(a: Self, b: Self, c: Self);
proof fn op_unit(a: Self);
}
Expand description
See StorageResource
for more information.
Required Methods§
sourcespec fn rel(self, s: Map<K, V>) -> bool
spec fn rel(self, s: Map<K, V>) -> bool
Note that rel
, in contrast to PCM::valid
, is not
necessarily closed under inclusion.
sourceproof fn commutative(a: Self, b: Self)
proof fn commutative(a: Self, b: Self)
ensures
Self::op(a, b) == Self::op(b, a),
sourceproof fn associative(a: Self, b: Self, c: Self)
proof fn associative(a: Self, b: Self, c: Self)
ensures
Self::op(a, Self::op(b, c)) == Self::op(Self::op(a, b), c),
Object Safety§
This trait is not object safe.