[][src]Module jlrs::traits

All traits used by this crate.

Most of these traits are intended for internal use only and you should never manually implement them for your own types nor call any of their trait methods. The three major exceptions to this rule are Frame, JuliaTuple and JuliaStruct.

The first of these three traits is implemented by the two frame types that can be used, StaticFrame and DynamicFrame, and provides the common functionality they offer. The other two traits can be derived in order to be able to create Julia tuples and structs from Rust with Value::new and convert them back to Rust with Value::cast. See the documentation for those traits for more information and requirements.

Another important trait is JuliaTypecheck. Types that implement this trait can be used in combination with Value::is and DataType::is in order to check a value's properties. Most of the structs that implement this trait are not included in the prelude.

Traits

Cast

This trait is implemented by types that a Value can be converted into by calling Value::cast. This includes types like String, Array, and u8.

Frame

Functionality shared by StaticFrame and DynamicFrame. These structs let you protect data from garbage collection. The lifetime of a frame is assigned to the values and outputs that are created using that frame. After a frame is dropped, these items are no longer protected and cannot be used.

IntoJulia

Trait implemented by types that can be converted to a Julia value in combination with Value::new.

JuliaStruct

In order to be able to create Julia structs from Rust and convert a Value that contains one back to Rust you will need to derive this trait. This has the following requirements:

JuliaTuple

In order to be able to create Julia tuples from Rust and convert a Value that contains one back to Rust you will need to derive this trait. This has the following requirements:

JuliaType

Trait implemented by types that have an associated type in Julia.

JuliaTypecheck

This trait is used in combination with Value::is and DataType::is; types that implement this trait can be used to check many properties of a Julia DataType.

TemporarySymbol

Trait implemented by types that can be converted to a temporary Symbol.