Array

Trait Array 

Source
pub trait Array: Sized {
    type Iterator: Iterator<Item = NonNull<u8>>;

    // Required methods
    fn as_raw(&self) -> GcPtr;
    fn element_type(&self) -> Type;
    fn length(&self) -> usize;
    fn capacity(&self) -> usize;
    fn elements(&self) -> Self::Iterator;
}
Expand description

A trait used to iterate over array elements

Required Associated Types§

Required Methods§

Source

fn as_raw(&self) -> GcPtr

Returns the raw GC ptr of the array

Source

fn element_type(&self) -> Type

Returns the type of an element

Source

fn length(&self) -> usize

Returns the length of the array

Source

fn capacity(&self) -> usize

Returns the capacity of the array

Source

fn elements(&self) -> Self::Iterator

Returns an iterator over the elements of the array

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§