pub trait MutOperation: Sized {
type Resource;
type ExecResult;
type NewState;
// Required methods
spec fn requires(
self,
pre: Self::Resource,
new_state: Self::NewState,
e: Self::ExecResult,
) -> bool;
spec fn ensures(
self,
pre: Self::Resource,
post: Self::Resource,
new_state: Self::NewState,
) -> bool;
// Provided methods
open spec fn peek_requires(self, r: Self::Resource) -> bool { ... }
fn peek_ensures(self, r: Self::Resource) -> bool { ... }
}
Required Associated Types§
Required Methods§
Provided Methods§
Sourceopen spec fn peek_requires(self, r: Self::Resource) -> bool
open spec fn peek_requires(self, r: Self::Resource) -> bool
{ true }
Sourceopen spec fn peek_ensures(self, r: Self::Resource) -> bool
open spec fn peek_ensures(self, r: Self::Resource) -> bool
{ true }
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.