[][src]Struct glsp::Arr

pub struct Arr { /* fields omitted */ }

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>

Notable traits for Root<GIter>

impl Iterator for Root<GIter> type Item = Result<Val, GError>;
[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>

Notable traits for Root<GIter>

impl Iterator for Root<GIter> type Item = Result<Val, GError>;
[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.

pub fn is_serializable(&self) -> bool[src]

Returns true if this array can be serialized and deserialized using Serde.

This method is only present when the "serde" feature is enabled.

pub fn check_serializability(&self) -> Result<(), &'static str>[src]

Returns Ok if this array can be serialized and deserialized using Serde.

This method is only present when the "serde" feature is enabled.

Trait Implementations

impl Debug for Arr[src]

impl<I> DequeAccess<I> for Arr where
    I: DequeIndex
[src]

impl<I, R> DequeAccessRange<I, R> for Arr where
    R: DequeRange<I> + Debug,
    I: DequeIndex
[src]

impl DequeOps for Arr[src]

type Element = Slot

type Item = Val

impl Display for Arr[src]

impl Eq for Arr[src]

impl Hash for Arr[src]

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?

impl PartialEq<Arr> for Arr[src]

impl PartialOrd<Arr> for Arr[src]

impl Serialize for Arr[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[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]

impl<T> IntoElement<Slot> for T where
    T: IntoVal
[src]

impl<T> IntoVal for T where
    T: StaticMarker, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.