[][src]Struct jlrs::value::Values

pub struct Values<'frame>(_, _, _);

Several values that are allocated consecutively. This can be used in combination with Value::call_values and WithOutput::call_values.

Implementations

impl<'frame> Values<'frame>[src]

pub fn len(self) -> usize[src]

Returns the number of Values in this group.

pub fn value(self, index: usize) -> JlrsResult<Value<'frame, 'static>>[src]

Get a specific Value in this group. Returns an error if the index is out of bounds.

pub fn new<T, V, F>(frame: &mut F, data: V) -> JlrsResult<Self> where
    T: IntoJulia,
    V: AsRef<[T]>,
    F: Frame<'frame>, 
[src]

Allocate several values of the same type, this type must implement IntoJulia. The values will be protected from garbage collection inside the frame used to create them. This takes as many slots on the GC stack as values that are allocated.

Returns an error if there is not enough space on the stack.

pub fn new_dyn<'v, V, F>(frame: &mut F, data: V) -> JlrsResult<Self> where
    V: AsRef<[&'v dyn IntoJulia]>,
    F: Frame<'frame>, 
[src]

Allocate several values of possibly different types, these types must implement IntoJulia. The values will be protected from garbage collection inside the frame used to create them. This takes as many slots on the GC stack as values that are allocated.

Returns an error if there is not enough space on the stack.

Trait Implementations

impl<'frame> Clone for Values<'frame>[src]

impl<'frame> Copy for Values<'frame>[src]

impl<'frame> Debug for Values<'frame>[src]

Auto Trait Implementations

impl<'frame> RefUnwindSafe for Values<'frame>

impl<'frame> !Send for Values<'frame>

impl<'frame> !Sync for Values<'frame>

impl<'frame> Unpin for Values<'frame>

impl<'frame> UnwindSafe for Values<'frame>

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> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.