pub trait SliceExt<T> {
// Required methods
fn to_mut_seq(&mut self) -> Seq<&mut T>;
fn to_ref_seq(&self) -> Seq<&T>;
fn as_ptr_perm(&self) -> (*const T, Ghost<&Perm<*const [T]>>);
fn as_mut_ptr_perm(&mut self) -> (*mut T, Ghost<&mut Perm<*const [T]>>);
}Required Methods§
Sourcefn to_mut_seq(&mut self) -> Seq<&mut T>
fn to_mut_seq(&mut self) -> Seq<&mut T>
⚠
Sourcefn to_ref_seq(&self) -> Seq<&T>
fn to_ref_seq(&self) -> Seq<&T>
⚠
Implementations on Foreign Types§
Source§impl<T> SliceExt<T> for [T]
impl<T> SliceExt<T> for [T]
Source§fn to_mut_seq(&mut self) -> Seq<&mut T>
fn to_mut_seq(&mut self) -> Seq<&mut T>
(opaque) ⚠
ensures
result.len() == self@.len()ensures
forall<i> 0 <= i && i < result.len() ==> result[i] == &mut self[i]Source§fn to_ref_seq(&self) -> Seq<&T>
fn to_ref_seq(&self) -> Seq<&T>
(opaque) ⚠
ensures
result.len() == self@.len()ensures
forall<i> 0 <= i && i < result.len() ==> result[i] == &self[i]Source§fn as_ptr_perm(&self) -> (*const T, Ghost<&Perm<*const [T]>>)
fn as_ptr_perm(&self) -> (*const T, Ghost<&Perm<*const [T]>>)
Convert &[T] to *const T and a shared ownership token.
terminates
ensures
result.0 == *result.1.ward() as *const Tensures
self == result.1.val()erasure
Self::as_ptrSource§fn as_mut_ptr_perm(&mut self) -> (*mut T, Ghost<&mut Perm<*const [T]>>)
fn as_mut_ptr_perm(&mut self) -> (*mut T, Ghost<&mut Perm<*const [T]>>)
Convert &mut [T] to *mut T and a mutable ownership token.
terminates
ensures
result.0 as *const T == *result.1.ward() as *const Tensures
&*self == result.1.val()ensures
&^self == (^result.1).val()erasure
Self::as_mut_ptr