Module jlrs::traits [−][src]
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 directly.
The one major exception is the Frame
trait. This trait is implemented by the two frame
types that are provided, StaticFrame
and DynamicFrame
which are used to ensure the
garbage collector doesn't drop the data that's used from Rust. It provides the common
functionality these frame types offer.
Two of the traits in this module are available as custom derive traits, JuliaStruct
and
IntoJulia
, which can be used to map a struct between Julia and Rust. Deriving the first
will implement JuliaType
, JuliaTypecheck
, ValidLayout
, and Cast
, which will let you
safely access the raw contents of a value; IntoJulia
can be derived for bits types and lets
you create new instances of that type using Value::new
. While it's possible to manually
implement and annotate these mapping structs, you should use JlrsReflect.jl
which can
generate these structs for you. If you do want to do this manually, see the documentation of
JuliaStruct
for instructions.
Re-exports
pub use bits_union::Align; |
pub use bits_union::BitsUnion; |
pub use bits_union::Flag; |
pub use cast::Cast; |
pub use frame::Frame; |
pub use gc::Gc; |
pub use into_julia::IntoJulia; |
pub use julia_type::JuliaType; |
pub use julia_typecheck::JuliaTypecheck; |
pub use temporary_symbol::TemporarySymbol; |
pub use valid_layout::ValidLayout; |
Modules
bits_union | Machinery for bits unions. |
cast | Convert a |
frame | |
gc | Control the garbage collector. |
into_julia | |
julia_type | |
julia_typecheck | |
multitask | Traits used to implement tasks for the async runtime. |
temporary_symbol | |
valid_layout |
Traits
JuliaStruct | This trait can be derived in order to provide a mapping between a type in Julia and one in Rust. When this trait is derived, the following traits are implemented: |