Module magnus::typed_data

source ·
Expand description

Types and Traits for wrapping Rust types as Ruby objects.

This, along with RTypedData, provides a Rust API to the rb_data_typed_object_wrap function from Ruby’s C API.

Structs§

  • A C struct containing metadata on a Rust type, for use with the rb_data_typed_object_wrap API.
  • A builder for DataType.
  • A Ruby Object wrapping a Rust type T.

Traits§

  • Trait for a Ruby-compatible #<=> method.
  • A helper trait used to define functions associated with a DataType.
  • Trait for a Ruby-compatible #dup and #clone methods.
  • Trait for a Ruby-compatible #hash method.
  • Trait for a Ruby-compatible #inspect method.
  • Trait for a Ruby-compatible #eql? method.
  • A trait for Rust types that can be used with the rb_data_typed_object_wrap API.