View

Trait 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

Implementations on Foreign Types§

Source§

impl View for char

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for i8

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for i16

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for i32

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for i64

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for i128

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for isize

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for str

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = Seq<char>

Source§

impl View for u8

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for u16

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for u32

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for u64

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for u128

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for usize

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Int

Source§

impl View for String

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = Seq<char>

Source§

impl View for Duration

Source§

fn view(self) -> Self::ViewTy

(opaque)

ensures

result >= 0 && result <= secs_to_nanos(u64::MAX@) + 999_999_999

Source§

type ViewTy = Int

Source§

impl View for Instant

Source§

fn view(self) -> Self::ViewTy

(opaque)

ensures

result >= 0

Source§

type ViewTy = Int

Source§

impl<'a, K: DeepModel, V> View for Iter<'a, K, V>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FMap<<K as DeepModel>::DeepModelTy, V>

Source§

impl<'a, K: DeepModel, V> View for IterMut<'a, K, V>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FMap<<K as DeepModel>::DeepModelTy, &'a mut V>

Source§

impl<'a, T> View for Iter<'a, T>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = &'a [T]

Source§

impl<'a, T> View for Iter<'a, T>

Source§

fn view(self) -> Option<&'a T>

(opaque)

Source§

type ViewTy = Option<&'a T>

Source§

impl<'a, T> View for IterMut<'a, T>

Source§

fn view(self) -> Option<&'a mut T>

(opaque)

Source§

type ViewTy = Option<&'a mut T>

Source§

impl<'a, T> View for Iter<'a, T>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = &'a [T]

Source§

impl<'a, T> View for IterMut<'a, T>

Source§

fn view(self) -> Self::ViewTy

(opaque)

ensures

(^result)@.len() == (*result)@.len()

Source§

type ViewTy = &'a mut [T]

Source§

impl<'a, T: DeepModel> View for Iter<'a, T>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FSet<<T as DeepModel>::DeepModelTy>

Source§

impl<'a, T: DeepModel, S> View for Difference<'a, T, S>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FSet<<T as DeepModel>::DeepModelTy>

Source§

impl<'a, T: DeepModel, S> View for Intersection<'a, T, S>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FSet<<T as DeepModel>::DeepModelTy>

Source§

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

Source§

fn view(self) -> Option<I>

(opaque)

Source§

type ViewTy = Option<I>

Source§

impl<K: DeepModel, V> View for IntoIter<K, V>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FMap<<K as DeepModel>::DeepModelTy, V>

Source§

impl<K: DeepModel, V, S> View for HashMap<K, V, S>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FMap<<K as DeepModel>::DeepModelTy, V>

Source§

impl<T> View for [T]

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Seq<T>

Source§

impl<T> View for Once<T>

Source§

fn view(self) -> Option<T>

(opaque)

Source§

type ViewTy = Option<T>

Source§

impl<T> View for Repeat<T>

Source§

fn view(self) -> T

(opaque)

Source§

type ViewTy = T

Source§

impl<T> View for IntoIter<T>

Source§

fn view(self) -> Option<T>

(opaque)

Source§

type ViewTy = Option<T>

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Seq<T>

(opaque)

ensures

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

Source§

type ViewTy = Seq<T>

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = Seq<T>

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Seq<T>

(opaque)

ensures

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

Source§

type ViewTy = Seq<T>

Source§

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

Source§

fn view(self) -> Self::ViewTy

Source§

type ViewTy = Seq<T>

Source§

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

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = Seq<T>

Source§

impl<T: DeepModel> View for IntoIter<T>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FSet<<T as DeepModel>::DeepModelTy>

Source§

impl<T: DeepModel, S> View for HashSet<T, S>

Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = FSet<<T as DeepModel>::DeepModelTy>

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

(open, inline)

(*self).view()

Source§

type ViewTy = <T as View>::ViewTy

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = Box<T>

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

(opaque)

Source§

type ViewTy = Box<T>

Implementors§

Source§

impl View for Tokens<'_>

Source§

impl View for PeanoInt

Source§

impl<K, V> View for Authority<K, V>

Source§

type ViewTy = FMap<K, V>

Source§

impl<K, V> View for Fragment<K, V>

Source§

impl<K, V> View for FMap<K, V>

Source§

impl<R: RA> View for Resource<R>

Source§

impl<T> View for PermCellOwn<T>

Source§

impl<T> View for SeqIter<T>

Source§

impl<T> View for SeqIterRef<'_, T>

Source§

impl<T: InhabitedInvariant> View for Subset<T>

Source§

impl<T: ?Sized> View for PredCell<T>