Skip to main content

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

logic

Implementations on Foreign Types§

Source§

impl View for char

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for i8

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for i16

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for i32

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for i64

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for i128

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for isize

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for str

Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

type ViewTy = Seq<char>

Source§

impl View for u8

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for u16

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for u32

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for u64

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for u128

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for usize

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Int

Source§

impl View for String

Available on crate feature std only.
Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

type ViewTy = Seq<char>

Source§

impl View for Duration

Source§

fn view(self) -> Self::ViewTy

logic(opaque)

ensures

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

Source§

type ViewTy = Int

Source§

impl View for Instant

Available on crate feature std only.
Source§

fn view(self) -> Self::ViewTy

logic(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

logic(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

logic(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

logic(opaque)

Source§

type ViewTy = &'a [T]

Source§

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

Source§

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

logic(opaque)

Source§

type ViewTy = Option<&'a T>

Source§

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

Source§

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

logic(opaque)

Source§

type ViewTy = Option<&'a mut T>

Source§

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

Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

type ViewTy = &'a [T]

Source§

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

Source§

fn view(self) -> Self::ViewTy

logic(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

logic(opaque)

Source§

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

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

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

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

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

Source§

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

Source§

fn view(self) -> Option<I>

logic(opaque)

Source§

type ViewTy = Option<I>

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

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

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

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

Source§

impl<T> View for [T]

Source§

fn view(self) -> Self::ViewTy

logic

Source§

type ViewTy = Seq<T>

Source§

impl<T> View for Once<T>

Source§

fn view(self) -> Option<T>

logic(opaque)

Source§

type ViewTy = Option<T>

Source§

impl<T> View for Repeat<T>

Source§

fn view(self) -> T

logic(opaque)

Source§

type ViewTy = T

Source§

impl<T> View for IntoIter<T>

Source§

fn view(self) -> Option<T>

logic(opaque)

Source§

type ViewTy = Option<T>

Source§

impl<T> View for MaybeUninit<T>

Source§

fn view(self) -> Option<T>

logic(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>

logic(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

logic(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>

logic(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

logic

Source§

type ViewTy = Seq<T>

Source§

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

Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

type ViewTy = Seq<T>

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

logic(opaque)

Source§

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

Source§

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

Available on crate feature nightly only.
Source§

fn view(self) -> Self::ViewTy

logic(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

logic(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

logic(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

logic(opaque)

Source§

type ViewTy = Box<T>

Implementors§

Source§

impl View for Tokens<'_>

Source§

impl View for PeanoInt

Source§

impl<C: ?Sized + Container<Value: Sized>> View for Perm<C>

Source§

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

Source§

impl<R: UnitRA> View for Authority<R>

Source§

impl<R: UnitRA> View for Fragment<R>

Source§

impl<T> View for SeqIter<T>

Source§

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

Source§

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