pub trait PrepareRecBody<T>: SpecRecBodywhere
T: DeepView<V = Self::T>,{
type EP: DeepView<V = Self::Param>;
// Required method
exec fn prepare_body<Exec>(
&self,
param: &Self::EP,
Ghost(spec_rec): Ghost<ParamRecSpecs<Self::Param, Self::T>>,
exec_rec: Exec,
v: &T,
) -> checked : Result<usize, PreSerializeError>
where Exec: Fn(&Self::EP, &T) -> Result<usize, PreSerializeError>;
}Expand description
Executable pre-serialization analysis for one recursive unfolding.
Required Associated Types§
Required Methods§
Sourceexec fn prepare_body<Exec>(
&self,
param: &Self::EP,
Ghost(spec_rec): Ghost<ParamRecSpecs<Self::Param, Self::T>>,
exec_rec: Exec,
v: &T,
) -> checked : Result<usize, PreSerializeError>
exec fn prepare_body<Exec>( &self, param: &Self::EP, Ghost(spec_rec): Ghost<ParamRecSpecs<Self::Param, Self::T>>, exec_rec: Exec, v: &T, ) -> checked : Result<usize, PreSerializeError>
requires
forall |pp: &Self::EP, vv: &T| call_requires(exec_rec, (pp, vv)),forall |pp: &Self::EP, vv: &T, rr: Result<usize, PreSerializeError>| {
call_ensures(exec_rec, (pp, vv), rr)
==> (rr matches Ok(
len,
) ==> {
&&& spec_rec(pp.deep_view()).0(vv.deep_view())
&&& len == spec_rec(pp.deep_view()).1(vv.deep_view())
})
},ensureschecked matches Ok(
len,
) ==> {
&&& self.spec_body(param.deep_view(), spec_rec).consistent(v.deep_view())
&&& len == self.spec_body(param.deep_view(), spec_rec).byte_len(v.deep_view())
},Execute one recursive unfolding, using exec_rec for all recursive positions in the body.
spec_rec is the ghost/spec callback bundle corresponding to exec_rec.
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.