pub struct SubView<E> { /* private fields */ }Implementations§
Source§impl<E: Clone> SubView<E>
impl<E: Clone> SubView<E>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> Option<&E>
Sourcepub fn iter(&self) -> Iter<'_, E> ⓘ
pub fn iter(&self) -> Iter<'_, E> ⓘ
Java SubView.iterator: ranged iterator over the backing vector.
Sourcepub fn push_last(&self, value: E) -> Self
pub fn push_last(&self, value: E) -> Self
Java SubView.pushLast: assoc at _end on the backing vector
(write-through when _end < v.count, append when equal) and extend.
Sourcepub fn pop_last_value(&self) -> Option<Self>
pub fn pop_last_value(&self) -> Option<Self>
Java SubView.popLast returns the view unchanged when empty; the port
surfaces that as None.
Sourcepub fn assoc_value(&self, index: usize, value: E) -> Option<Self>
pub fn assoc_value(&self, index: usize, value: E) -> Option<Self>
Java SubView.assoc: write-through into the backing vector; assoc at
len() extends the view like push_last.
Trait Implementations§
Auto Trait Implementations§
impl<E> !RefUnwindSafe for SubView<E>
impl<E> !Send for SubView<E>
impl<E> !Sync for SubView<E>
impl<E> !UnwindSafe for SubView<E>
impl<E> Freeze for SubView<E>
impl<E> Unpin for SubView<E>
impl<E> UnsafeUnpin for SubView<E>where
Standard<E>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more