[−][src]Struct glsp_engine::Arr
The arr
primitive type.
Most of this type's methods belong to the deque
abstract type, so they can be found in the
traits DequeOps
, DequeAccess
, and
DequeAccessRange
.
New arrays can be constructed using the arr!
macro or various toplevel
functions, such as glsp::arr
and glsp::arr_from_iter
.
Arrays are always stored on the garbage-collected heap, so they're normally represented by
the type Root<Arr>
.
Implementations
impl Arr
[src]
pub fn shallow_clone(&self) -> Root<Arr>ⓘ
[src]
Creates a shallow copy of an array.
Equivalent to (clone ar)
.
pub fn deep_clone(&self) -> GResult<Root<Arr>>
[src]
Recursively copies an array and all of its contents.
Equivalent to (deep-clone ar)
.
pub fn try_eq(&self, other: &Arr) -> GResult<bool>
[src]
Equivalent to (eq? self other)
.
Note that, because this method may need to invoke an op-eq?
method when one of its
elements is an object or an RData
, it can potentially fail.
The same is true for PartialEq
comparisons between arrays using Rust's ==
operator.
In that case, if an error occurs, the operator will panic.
pub fn access_giter(arr: &Root<Arr>, giter: &Root<GIter>) -> Root<GIter>ⓘ
[src]
Creates an indexing iterator for this collection.
Equivalent to [ar iter]
.
impl Arr
[src]
pub fn is_representable(&self) -> bool
[src]
Returns true
if this array can be losslessly converted to text.
pub fn check_representability(&self) -> Result<(), &'static str>
[src]
Returns Ok
if this array can be losslessly converted to text.
Trait Implementations
impl Debug for Arr
[src]
impl<I: DequeIndex> DequeAccess<I> for Arr
[src]
pub fn get<R: FromElement<Slot>>(&self, index: I) -> GResult<R>
[src]
pub fn set<V: IntoElement<Slot>>(&self, index: I, val: V) -> GResult<()>
[src]
pub fn insert<V: IntoElement<Slot>>(&self, index: I, val: V) -> GResult<()>
[src]
pub fn del(&self, index: I) -> GResult<()>
[src]
pub fn remove<R: FromElement<Slot>>(&self, index: I) -> GResult<R>
[src]
pub fn swap_remove<R: FromElement<Slot>>(&self, index: I) -> GResult<R>
[src]
pub fn swap_remove_start<R: FromElement<Slot>>(&self, index: I) -> GResult<R>
[src]
impl<I: DequeIndex, R: DequeRange<I> + Debug> DequeAccessRange<I, R> for Arr
[src]
impl DequeOps for Arr
[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 can_mutate(&self) -> bool
[src]
pub fn sort(&self) -> GResult<()>
[src]
pub fn sort_by<F>(&self, f: F) -> GResult<()> where
F: FnMut(&Val, &Val) -> GResult<Ordering>,
[src]
F: FnMut(&Val, &Val) -> GResult<Ordering>,
pub fn push<V: IntoElement<Slot>>(&self, val: V) -> GResult<()>
[src]
pub fn pop<R: FromElement<Slot>>(&self) -> GResult<R>
[src]
pub fn push_start<V: IntoElement<Slot>>(&self, val: V) -> GResult<()>
[src]
pub fn pop_start<R: FromElement<Slot>>(&self) -> GResult<R>
[src]
pub fn grow<V: IntoElement<Slot>>(
&self,
start_to_add: usize,
end_to_add: usize,
fill: V
) -> GResult<()>
[src]
&self,
start_to_add: usize,
end_to_add: usize,
fill: V
) -> GResult<()>
pub fn shrink(
&self,
start_to_remove: usize,
end_to_remove: usize
) -> GResult<()>
[src]
&self,
start_to_remove: usize,
end_to_remove: usize
) -> GResult<()>
pub fn append(&self, other: &Arr) -> GResult<()>
[src]
pub fn prepend(&self, other: &Arr) -> GResult<()>
[src]
pub fn resize<V: IntoElement<Slot>>(
&self,
new_len: usize,
fill: V
) -> GResult<()>
[src]
&self,
new_len: usize,
fill: V
) -> GResult<()>
pub fn rotate_left(&self, mid: usize) -> GResult<()>
[src]
pub fn rotate_right(&self, k: usize) -> GResult<()>
[src]
pub fn swap<I1, I2>(&self, index1: I1, index2: I2) -> GResult<()> where
I1: DequeIndex,
I2: DequeIndex,
[src]
I1: DequeIndex,
I2: DequeIndex,
pub fn capacity(&self) -> usize
[src]
pub fn len(&self) -> usize
[src]
pub fn reserve_exact(&self, additional: usize) -> GResult<()>
[src]
pub fn reserve(&self, additional: usize) -> GResult<()>
[src]
pub fn shrink_to_fit(&self) -> GResult<()>
[src]
pub fn truncate(&self, len: usize) -> GResult<()>
[src]
pub fn clear(&self) -> GResult<()>
[src]
pub fn contains<V: IntoElement<Slot>>(&self, x: V) -> GResult<bool>
[src]
pub fn extend<I, V>(&self, source: I) -> GResult<()> where
I: IntoIterator<Item = V>,
V: IntoElement<Slot>,
[src]
I: IntoIterator<Item = V>,
V: IntoElement<Slot>,
pub fn is_empty(&self) -> bool
[src]
pub fn iter<'a>(&'a self) -> IterDeque<'a, Self>ⓘ where
Self: DequeAccess<usize>,
[src]
Self: DequeAccess<usize>,
pub fn iter_to<'a, R: FromElement<Self::Element>>(
&'a self
) -> IterDequeTo<'a, Self, R>ⓘNotable traits for IterDequeTo<'a, T, R>
impl<'a, T: DequeAccess<usize>, R: FromElement<T::Element>> Iterator for IterDequeTo<'a, T, R> type Item = GResult<R>;
where
Self: DequeAccess<usize>,
[src]
&'a self
) -> IterDequeTo<'a, Self, R>ⓘ
Notable traits for IterDequeTo<'a, T, R>
impl<'a, T: DequeAccess<usize>, R: FromElement<T::Element>> Iterator for IterDequeTo<'a, T, R> type Item = GResult<R>;
Self: DequeAccess<usize>,
impl Display for Arr
[src]
impl Eq for Arr
[src]
impl Hash for Arr
[src]
pub fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a> IntoIterator for &'a Arr
[src]
type Item = Val
The type of the elements being iterated over.
type IntoIter = IterDeque<'a, Arr>
Which kind of iterator are we turning this into?
pub fn into_iter(self) -> IterDeque<'a, Arr>ⓘ
[src]
impl PartialEq<Arr> for Arr
[src]
pub fn eq(&self, other: &Arr) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Arr> for Arr
[src]
pub fn partial_cmp(&self, other: &Arr) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Splay for Arr
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Arr
[src]
impl !Send for Arr
[src]
impl !Sync for Arr
[src]
impl Unpin for Arr
[src]
impl !UnwindSafe for Arr
[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
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,