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]
Self: Send,
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]
Self: Send,
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]
self: Gc<Self>,
vm: &mut VM,
idx: usize,
val: Val
) -> Result<(), Box<VMError>> where
Self: Send,
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]
Self: Send,
Iterate over this array’s values.
Implementors
impl Array for MethodsArray
[src]
fn at(self: Gc<Self>, vm: &VM, idx: usize) -> Result<Val, Box<VMError>>
[src]
unsafe fn unchecked_at(self: Gc<Self>, idx: usize) -> Val
[src]
fn at_put(
self: Gc<Self>,
vm: &mut VM,
idx: usize,
val: Val
) -> Result<(), Box<VMError>>
[src]
self: Gc<Self>,
vm: &mut VM,
idx: usize,
val: Val
) -> Result<(), Box<VMError>>