[−][src]Struct glsp::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
.
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) -> Result<Root<Arr>, GError>
[src]
Recursively copies an array and all of its contents.
Equivalent to (deep-clone ar)
.
pub fn try_eq(&self, other: &Arr) -> Result<bool, GError>
[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 check_representability(&self) -> Result<(), &'static str>
[src]
Returns Ok
if this array can be losslessly converted to text.
pub fn check_serializability(&self) -> Result<(), &'static str>
[src]
Returns Ok
if this array can be serialized and deserialized using Serde.
Trait Implementations
impl Debug for Arr
[src]
impl<I> DequeAccess<I> for Arr where
I: DequeIndex,
[src]
I: DequeIndex,
fn get<R>(&self, index: I) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
fn set<V>(&self, index: I, val: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
fn insert<V>(&self, index: I, val: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
fn del(&self, index: I) -> Result<(), GError>
[src]
fn remove<R>(&self, index: I) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
fn swap_remove<R>(&self, index: I) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
fn swap_remove_start<R>(&self, index: I) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
impl<I, R> DequeAccessRange<I, R> for Arr where
I: DequeIndex,
R: DequeRange<I> + Debug,
[src]
I: DequeIndex,
R: DequeRange<I> + Debug,
impl DequeOps for Arr
[src]
type Element = Slot
type Item = Val
fn freeze(&self)
[src]
fn deep_freeze(&self)
[src]
fn is_frozen(&self) -> bool
[src]
fn is_deep_frozen(&self) -> bool
[src]
fn can_mutate(&self) -> bool
[src]
fn push<V>(&self, val: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
fn pop<R>(&self) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
fn push_start<V>(&self, val: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
fn pop_start<R>(&self) -> Result<R, GError> where
R: FromElement<Slot>,
[src]
R: FromElement<Slot>,
fn grow<V>(
&self,
start_to_add: usize,
end_to_add: usize,
fill: V
) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
&self,
start_to_add: usize,
end_to_add: usize,
fill: V
) -> Result<(), GError> where
V: IntoElement<Slot>,
fn shrink(
&self,
start_to_remove: usize,
end_to_remove: usize
) -> Result<(), GError>
[src]
&self,
start_to_remove: usize,
end_to_remove: usize
) -> Result<(), GError>
fn append(&self, other: &Arr) -> Result<(), GError>
[src]
fn prepend(&self, other: &Arr) -> Result<(), GError>
[src]
fn resize<V>(&self, new_len: usize, fill: V) -> Result<(), GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
fn rotate_left(&self, mid: usize) -> Result<(), GError>
[src]
fn rotate_right(&self, k: usize) -> Result<(), GError>
[src]
fn swap<I1, I2>(&self, index1: I1, index2: I2) -> Result<(), GError> where
I1: DequeIndex,
I2: DequeIndex,
[src]
I1: DequeIndex,
I2: DequeIndex,
fn capacity(&self) -> usize
[src]
fn len(&self) -> usize
[src]
fn reserve_exact(&self, additional: usize) -> Result<(), GError>
[src]
fn reserve(&self, additional: usize) -> Result<(), GError>
[src]
fn shrink_to_fit(&self) -> Result<(), GError>
[src]
fn truncate(&self, len: usize) -> Result<(), GError>
[src]
fn clear(&self) -> Result<(), GError>
[src]
fn contains<V>(&self, x: V) -> Result<bool, GError> where
V: IntoElement<Slot>,
[src]
V: IntoElement<Slot>,
fn extend<I, V>(&self, source: I) -> Result<(), GError> where
I: IntoIterator<Item = V>,
V: IntoElement<Slot>,
[src]
I: IntoIterator<Item = V>,
V: IntoElement<Slot>,
fn is_empty(&self) -> bool
[src]
fn iter(&'a self) -> IterDeque<'a, Self> where
Self: DequeAccess<usize>,
[src]
Self: DequeAccess<usize>,
fn iter_to<R>(&'a self) -> IterDequeTo<'a, Self, R> where
R: FromElement<Self::Element>,
Self: DequeAccess<usize>,
[src]
R: FromElement<Self::Element>,
Self: DequeAccess<usize>,
impl Display for Arr
[src]
impl Hash for Arr
[src]
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
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?
fn into_iter(self) -> IterDeque<'a, Arr>
[src]
impl<'a, 'r> MakeArg<'a> for &'r Arr where
'a: 'r,
[src]
'a: 'r,
impl PartialEq<Arr> for Arr
[src]
impl Serialize for Arr
[src]
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl Splay for Arr
[src]
Auto Trait Implementations
impl !GSend for Arr
impl GStore for Arr
impl !RefUnwindSafe for Arr
impl !Send for Arr
impl !Sync for Arr
impl Unpin for Arr
impl !UnwindSafe for Arr
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
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.
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>,