Trait creusot_contracts::model::DeepModel
source · pub trait DeepModel {
type DeepModelTy;
// Required method
fn deep_model(self) -> Self::DeepModelTy;
}
Expand description
The deep model corresponds to the model used for specifying operations such as equality, hash function or ordering, which are computed deeply in a data structure. Typically, such a model recursively calls deep models of inner types.
Required Associated Types§
type DeepModelTy
Required Methods§
sourcefn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
Implementations on Foreign Types§
source§impl DeepModel for bool
impl DeepModel for bool
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
self
type DeepModelTy = bool
source§impl DeepModel for i8
impl DeepModel for i8
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for i16
impl DeepModel for i16
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for i32
impl DeepModel for i32
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for i64
impl DeepModel for i64
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for i128
impl DeepModel for i128
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for isize
impl DeepModel for isize
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for u8
impl DeepModel for u8
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for u16
impl DeepModel for u16
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for u32
impl DeepModel for u32
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for u64
impl DeepModel for u64
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for u128
impl DeepModel for u128
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for ()
impl DeepModel for ()
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { () }
type DeepModelTy = ()
source§impl DeepModel for usize
impl DeepModel for usize
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { self@ }
type DeepModelTy = Int
source§impl DeepModel for BigRational
impl DeepModel for BigRational
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
type DeepModelTy = Real
source§impl<A: DeepModel> DeepModel for (A,)
impl<A: DeepModel> DeepModel for (A,)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy,)
source§impl<A: DeepModel, B: DeepModel> DeepModel for (A, B)
impl<A: DeepModel, B: DeepModel> DeepModel for (A, B)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel> DeepModel for (A, B, C)
impl<A: DeepModel, B: DeepModel, C: DeepModel> DeepModel for (A, B, C)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel> DeepModel for (A, B, C, D)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel> DeepModel for (A, B, C, D)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel> DeepModel for (A, B, C, D, E)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel> DeepModel for (A, B, C, D, E)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel> DeepModel for (A, B, C, D, E, F)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel> DeepModel for (A, B, C, D, E, F)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel> DeepModel for (A, B, C, D, E, F, G)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel> DeepModel for (A, B, C, D, E, F, G)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel> DeepModel for (A, B, C, D, E, F, G, H)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel> DeepModel for (A, B, C, D, E, F, G, H)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy, <I as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy, <I as DeepModel>::DeepModelTy, <J as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel, K: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J, K)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel, K: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J, K)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy, <I as DeepModel>::DeepModelTy, <J as DeepModel>::DeepModelTy, <K as DeepModel>::DeepModelTy)
source§impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel, K: DeepModel, L: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J, K, L)
impl<A: DeepModel, B: DeepModel, C: DeepModel, D: DeepModel, E: DeepModel, F: DeepModel, G: DeepModel, H: DeepModel, I: DeepModel, J: DeepModel, K: DeepModel, L: DeepModel> DeepModel for (A, B, C, D, E, F, G, H, I, J, K, L)
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
pearlite! { ($(self.$idx.deep_model(),)+) }
type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy, <C as DeepModel>::DeepModelTy, <D as DeepModel>::DeepModelTy, <E as DeepModel>::DeepModelTy, <F as DeepModel>::DeepModelTy, <G as DeepModel>::DeepModelTy, <H as DeepModel>::DeepModelTy, <I as DeepModel>::DeepModelTy, <J as DeepModel>::DeepModelTy, <K as DeepModel>::DeepModelTy, <L as DeepModel>::DeepModelTy)
source§impl<T: DeepModel + ?Sized> DeepModel for &T
impl<T: DeepModel + ?Sized> DeepModel for &T
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
(*self).deep_model()
type DeepModelTy = <T as DeepModel>::DeepModelTy
source§impl<T: DeepModel + ?Sized> DeepModel for &mut T
impl<T: DeepModel + ?Sized> DeepModel for &mut T
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic
(*self).deep_model()
type DeepModelTy = <T as DeepModel>::DeepModelTy
source§impl<T: DeepModel> DeepModel for [T]
impl<T: DeepModel> DeepModel for [T]
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
ensures
(&self)@.len() == result.len()
ensures
forall<i: Int> 0 <= i && i < result.len() ==> result[i] == (&self)[i].deep_model()
type DeepModelTy = Seq<<T as DeepModel>::DeepModelTy>
source§impl<T: DeepModel, const N: usize> DeepModel for [T; N]
impl<T: DeepModel, const N: usize> DeepModel for [T; N]
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
ensures
self.view().len() == result.len()
ensures
forall<i: _> 0 <= i && i < result.len() ==> result[i] == self[i].deep_model()
type DeepModelTy = Seq<<T as DeepModel>::DeepModelTy>
source§impl<T: ?Sized> DeepModel for *const T
impl<T: ?Sized> DeepModel for *const T
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
ensures
result.addr == self.addr_logic()
type DeepModelTy = PtrDeepModel
source§impl<T: ?Sized> DeepModel for *mut T
impl<T: ?Sized> DeepModel for *mut T
source§fn deep_model(self) -> Self::DeepModelTy
fn deep_model(self) -> Self::DeepModelTy
logic ⚠
ensures
result.addr == self.addr_logic()