Skip to main content

ExecSpecSeqLast

Trait ExecSpecSeqLast 

Source
pub trait ExecSpecSeqLast<'a>: Sized + DeepView<V = Seq<<Self::Elem as DeepView>::V>> {
    type Elem: DeepView;

    // Required method
    exec fn exec_last(self) -> Self::Elem;
}
Expand description

Spec for executable version of Seq::last.

Required Associated Types§

Required Methods§

Source

exec fn exec_last(self) -> Self::Elem

requires
0 < self.deep_view().len(),

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T: DeepView> ExecSpecSeqLast<'a> for &'a [T]

Source§

exec fn exec_last(self) -> res : Self::Elem

ensures
res.deep_view() == self.deep_view().last(),
Source§

type Elem = &'a T

Implementors§