Trait yksom::vm::objects::Array[][src]

pub trait Array: Send {
    fn at(self: Gc<Self>, vm: &VM, idx: usize) -> Result<Val, Box<VMError>>
    where
        Self: Send
;
unsafe fn unchecked_at(self: Gc<Self>, idx: usize) -> Val
    where
        Self: Send
;
fn at_put(
        self: Gc<Self>,
        vm: &mut VM,
        idx: usize,
        val: Val
    ) -> Result<(), Box<VMError>>
    where
        Self: Send
;
fn iter(self: Gc<Self>) -> ArrayIterator
    where
        Self: Send
; }

Required methods

fn at(self: Gc<Self>, vm: &VM, idx: usize) -> Result<Val, Box<VMError>> where
    Self: Send
[src]

Return the item at index idx (using SOM indexing starting at 1) or an error if the index is invalid.

unsafe fn unchecked_at(self: Gc<Self>, idx: usize) -> Val where
    Self: Send
[src]

Return the item at index idx (using SOM indexing starting at 1). This will lead to undefined behaviour if the index is invalid.

fn at_put(
    self: Gc<Self>,
    vm: &mut VM,
    idx: usize,
    val: Val
) -> Result<(), Box<VMError>> where
    Self: Send
[src]

Set the item at index idx (using SOM indexing starting at 1) to val or return an error if the index is invalid.

fn iter(self: Gc<Self>) -> ArrayIterator where
    Self: Send
[src]

Iterate over this array’s values.

Loading content...

Implementors

impl Array for MethodsArray[src]

impl Array for NormalArray[src]

Loading content...