[−][src]Enum glsp::Deque
A type-erased deque
.
Because this type implements the DequeOps
trait, you can manipulate it
directly, without needing to access the underlying Root<Arr>
or
Root<Str>
.
Variants
Implementations
impl Deque
[src]
pub fn same(&self, other: &Deque) -> bool
[src]
Returns true
if both deques share the same identity.
Equivalent to (same? deq other)
.
pub fn shallow_clone(&self) -> Deque
[src]
Creates a shallow copy of the deque.
Equivalent to (clone deq)
.
pub fn deep_clone(&self) -> Result<Deque, GError>
[src]
Recursively copies the deque and all of its contents.
Equivalent to (deep-clone deq)
.
pub fn access_giter(&self, giter: &Root<GIter>) -> Root<GIter>ⓘ
[src]
Creates an indexing iterator for this collection.
Equivalent to [deq iter]
.
Trait Implementations
impl Clone for Deque
[src]
impl Debug for Deque
[src]
impl<I> DequeAccess<I> for Deque where
I: DequeIndex,
[src]
I: DequeIndex,
pub fn get<R>(&self, i: I) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
pub fn set<V>(&self, i: I, v: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
pub fn insert<V>(&self, i: I, v: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
pub fn del(&self, i: I) -> Result<(), GError>
[src]
pub fn remove<R>(&self, i: I) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
pub fn swap_remove<R>(&self, i: I) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
pub fn swap_remove_start<R>(&self, i: I) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
impl<I, R> DequeAccessRange<I, R> for Deque where
R: DequeRange<I> + Debug,
I: DequeIndex,
[src]
R: DequeRange<I> + Debug,
I: DequeIndex,
impl DequeOps for Deque
[src]
type Element = Slot
type Item = Val
pub fn freeze(&self)
[src]
pub fn deep_freeze(&self)
[src]
pub fn is_frozen(&self) -> bool
[src]
pub fn is_deep_frozen(&self) -> bool
[src]
pub fn sort(&self) -> Result<(), GError>
[src]
pub fn sort_by<F>(&self, f: F) -> Result<(), GError> where
F: FnMut(&Val, &Val) -> Result<Ordering, GError>,
[src]
F: FnMut(&Val, &Val) -> Result<Ordering, GError>,
pub fn can_mutate(&self) -> bool
[src]
pub fn swap<I1, I2>(&self, i: I1, j: I2) -> Result<(), GError> where
I1: DequeIndex,
I2: DequeIndex,
[src]
I1: DequeIndex,
I2: DequeIndex,
pub fn len(&self) -> usize
[src]
pub fn contains<V>(&self, v: V) -> Result<bool, GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
pub fn push<V>(&self, v: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
pub fn pop<R>(&self) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
pub fn push_start<V>(&self, v: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
pub fn pop_start<R>(&self) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
pub fn grow<V>(&self, start: usize, end: usize, fill: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
pub fn shrink(&self, start: usize, end: usize) -> Result<(), GError>
[src]
pub fn append(&self, _other: &Deque) -> Result<(), GError>
[src]
pub fn prepend(&self, _other: &Deque) -> Result<(), GError>
[src]
pub fn resize<V>(&self, new_len: usize, fill: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
pub fn rotate_left(&self, mid: usize) -> Result<(), GError>
[src]
pub fn rotate_right(&self, k: usize) -> Result<(), GError>
[src]
pub fn capacity(&self) -> usize
[src]
pub fn reserve_exact(&self, additional: usize) -> Result<(), GError>
[src]
pub fn reserve(&self, additional: usize) -> Result<(), GError>
[src]
pub fn shrink_to_fit(&self) -> Result<(), GError>
[src]
pub fn truncate(&self, len: usize) -> Result<(), GError>
[src]
pub fn clear(&self) -> Result<(), GError>
[src]
pub fn extend<I, C>(&self, source: I) -> Result<(), GError> where
C: IntoElement<Slot>,
I: IntoIterator<Item = C>,
[src]
C: IntoElement<Slot>,
I: IntoIterator<Item = C>,
pub fn is_empty(&self) -> bool
[src]
pub fn iter(&'a self) -> IterDeque<'a, Self>ⓘ where
Self: DequeAccess<usize>,
[src]
Self: DequeAccess<usize>,
pub fn iter_to<R>(&'a self) -> IterDequeTo<'a, Self, R>ⓘNotable traits for IterDequeTo<'a, T, R>
impl<'a, T, R> Iterator for IterDequeTo<'a, T, R> where
T: DequeAccess<usize>,
R: FromElement<<T as DequeOps>::Element>, type Item = Result<R, GError>;
where
Self: DequeAccess<usize>,
R: FromElement<Self::Element>,
[src]
Notable traits for IterDequeTo<'a, T, R>
impl<'a, T, R> Iterator for IterDequeTo<'a, T, R> where
T: DequeAccess<usize>,
R: FromElement<<T as DequeOps>::Element>, type Item = Result<R, GError>;
Self: DequeAccess<usize>,
R: FromElement<Self::Element>,
impl FromVal for Deque
[src]
impl<'a> IntoVal for &'a Deque
[src]
impl<'a> IntoVal for &'a mut Deque
[src]
impl IntoVal for Deque
[src]
impl PartialEq<Deque> for Deque
[src]
impl Splay for Deque
[src]
impl StructuralPartialEq for Deque
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Deque
[src]
impl !Send for Deque
[src]
impl !Sync for Deque
[src]
impl Unpin for Deque
[src]
impl !UnwindSafe for Deque
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> FromElement<Slot> for T where
T: FromVal,
[src]
T: FromVal,
pub fn from_element(item: &Slot) -> Result<T, GError>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoElement<Slot> for T where
T: IntoVal,
[src]
T: IntoVal,
pub fn into_element(self) -> Result<Slot, GError>
[src]
impl<T> IntoVal for T where
T: StaticMarker,
[src]
T: StaticMarker,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,