Trait creusot_contracts::model::View

source ·
pub trait View {
    type ViewTy;

    // Required method
    fn view(self) -> Self::ViewTy;
}
Expand description

The view of a type is its logical model as typically used to specify a data structure. It is typically “shallow”, and does not involve the model of other types contained by the datastructure. This kind of model is mostly useful for notation purposes, because this trait is linked to the @ notation of pearlite.

Required Associated Types§

Required Methods§

source

fn view(self) -> Self::ViewTy

logic

Implementations on Foreign Types§

source§

impl View for i8

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for i16

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for i32

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for i64

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for i128

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for isize

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for str

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Seq<char>

source§

impl View for u8

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for u16

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for u32

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for u64

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for u128

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl View for usize

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Int

source§

impl<T> View for [T]

source§

fn view(self) -> Self::ViewTy

logic

ensures

result.len() <= usize::MAX@

ensures

result == slice_model(&self)

§

type ViewTy = Seq<T>

source§

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

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Seq<T>

source§

impl<T, const N: usize> View for IntoIter<T, N>

source§

fn view(self) -> Self::ViewTy

logic

§

type ViewTy = Seq<T>

source§

impl<T: View + ?Sized> View for &T

source§

fn view(self) -> Self::ViewTy

logic

(*self).view()

§

type ViewTy = <T as View>::ViewTy

source§

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

source§

fn view(self) -> Self::ViewTy

logic

(*self).view()

§

type ViewTy = <T as View>::ViewTy

source§

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

source§

fn view(self) -> Int

logic

self.addr_logic()

§

type ViewTy = Int

source§

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

source§

fn view(self) -> Int

logic

self.addr_logic()

§

type ViewTy = Int

Implementors§

source§

impl View for String

§

type ViewTy = Seq<char>

source§

impl View for Duration

§

type ViewTy = Int

source§

impl View for Instant

§

type ViewTy = Int

source§

impl<'a, T> View for creusot_contracts::std::collections::vec_deque::Iter<'a, T>

§

type ViewTy = &'a [T]

source§

impl<'a, T> View for creusot_contracts::std::option::Iter<'a, T>

source§

impl<'a, T> View for creusot_contracts::std::option::IterMut<'a, T>

source§

impl<'a, T> View for creusot_contracts::std::slice::Iter<'a, T>

§

type ViewTy = &'a [T]

source§

impl<'a, T> View for creusot_contracts::std::slice::IterMut<'a, T>

§

type ViewTy = &'a mut [T]

source§

impl<I: Iterator> View for Fuse<I>

§

type ViewTy = Option<I>

source§

impl<T> View for Once<T>

§

type ViewTy = Option<T>

source§

impl<T> View for Repeat<T>

§

type ViewTy = T

source§

impl<T> View for creusot_contracts::std::option::IntoIter<T>

§

type ViewTy = Option<T>

source§

impl<T> View for Rc<T>

§

type ViewTy = T

source§

impl<T> View for Arc<T>

§

type ViewTy = T

source§

impl<T, A: Allocator> View for VecDeque<T, A>

§

type ViewTy = Seq<T>

source§

impl<T, A: Allocator> View for Vec<T, A>

§

type ViewTy = Seq<T>

source§

impl<T, A: Allocator> View for creusot_contracts::std::vec::IntoIter<T, A>

§

type ViewTy = Seq<T>

source§

impl<T: View + ?Sized> View for GhostBox<T>

§

type ViewTy = <T as View>::ViewTy

source§

impl<T: View + ?Sized> View for Snapshot<T>

§

type ViewTy = <T as View>::ViewTy

source§

impl<T: View + ?Sized, A: Allocator> View for Box<T, A>

§

type ViewTy = <T as View>::ViewTy