Trait 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§

Required Methods§

Source

fn deep_model(self) -> Self::DeepModelTy

logic

Implementations on Foreign Types§

Source§

impl DeepModel for bool

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

self

Source§

type DeepModelTy = bool

Source§

impl DeepModel for char

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for i8

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for i16

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for i32

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for i64

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for i128

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for isize

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for u8

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for u16

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for u32

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for u64

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for u128

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for ()

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { () }

Source§

type DeepModelTy = ()

Source§

impl DeepModel for usize

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self@ }

Source§

type DeepModelTy = Int

Source§

impl DeepModel for BigRational

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

Source§

type DeepModelTy = Real

Source§

impl<A: DeepModel> DeepModel for (A,)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

type DeepModelTy = (<A as DeepModel>::DeepModelTy,)

Source§

impl<A: DeepModel, B: DeepModel> DeepModel for (A, B)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

type DeepModelTy = (<A as DeepModel>::DeepModelTy, <B as DeepModel>::DeepModelTy)

Source§

impl<A: DeepModel, B: DeepModel, C: DeepModel> DeepModel for (A, B, C)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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)

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { ($(self.$idx.deep_model(),)+) }

Source§

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

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

(*self).deep_model()

Source§

type DeepModelTy = <T as DeepModel>::DeepModelTy

Source§

impl<T: DeepModel + ?Sized> DeepModel for &mut T

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

(*self).deep_model()

Source§

type DeepModelTy = <T as DeepModel>::DeepModelTy

Source§

impl<T: DeepModel> DeepModel for [T]

Source§

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()
Source§

type DeepModelTy = Seq<<T as DeepModel>::DeepModelTy>

Source§

impl<T: DeepModel, A: Allocator> DeepModel for Rc<T, A>

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self.view().deep_model() }

Source§

type DeepModelTy = <T as DeepModel>::DeepModelTy

Source§

impl<T: DeepModel, A: Allocator> DeepModel for Arc<T, A>

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

pearlite! { self.view().deep_model() }

Source§

type DeepModelTy = <T as DeepModel>::DeepModelTy

Source§

impl<T: DeepModel, const N: usize> DeepModel for [T; N]

Source§

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()
Source§

type DeepModelTy = Seq<<T as DeepModel>::DeepModelTy>

Source§

impl<T: ?Sized> DeepModel for *const T

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

ensures

result.addr == self.addr_logic()

Source§

type DeepModelTy = PtrDeepModel

Source§

impl<T: ?Sized> DeepModel for *mut T

Source§

fn deep_model(self) -> Self::DeepModelTy

logic

ensures

result.addr == self.addr_logic()

Source§

type DeepModelTy = PtrDeepModel

Implementors§