Module jlrs::value::tuple[][src]

Generic Tuples of different sizes.

In this module generic tuple types from Tuple0 up to and including Tuple32 are available. These types can be use to work with tuple values from Julia. A new tuple can be created with Value::new if all fields implement the IntoJulia trait:

julia.frame(2, |global, frame| {
    let tup = Tuple2(2i32, true);
    let val = Value::new(frame, tup)?;
    assert!(val.is::<Tuple2<i32, bool>>());
    assert!(val.cast::<Tuple2<i32, bool>>().is_ok());
    Ok(())
}).unwrap();

Structs

Tuple

A typecheck that can be used in combination with DataType::is. This method returns true if a value of this type is a tuple.

Tuple0
Tuple1
Tuple2
Tuple3
Tuple4
Tuple5
Tuple6
Tuple7
Tuple8
Tuple9
Tuple10
Tuple11
Tuple12
Tuple13
Tuple14
Tuple15
Tuple16
Tuple17
Tuple18
Tuple19
Tuple20
Tuple21
Tuple22
Tuple23
Tuple24
Tuple25
Tuple26
Tuple27
Tuple28
Tuple29
Tuple30
Tuple31
Tuple32