ruby-types 0.0.1

📦 Ruby value and error types for Rusty Ruby
Documentation
  • Coverage
  • 100%
    36 out of 36 items documented0 out of 18 items with examples
  • Size
  • Source code size: 12.9 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • nyar-vm/rusty-ruby
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • fqq

Ruby Types

This crate provides the core type definitions for the Rusty Ruby ecosystem, including RubyValue, RubyError, and related types.

Features

  • RubyValue: A unified type for representing Ruby values in Rust
  • RubyError: Error types for Ruby operations
  • RubyResult: Result type for Ruby operations
  • Traits for converting between Rust and Ruby types

Usage

use ruby_types::{RubyValue, RubyError, RubyResult, ToRubyValue, FromRubyValue};

// Create a Ruby value
let ruby_string = RubyValue::String("Hello, Ruby!".to_string());

// Convert from Rust types
let rust_string: String = "Hello, Rust!".to_string();
let ruby_string = rust_string.to_ruby_value();

// Convert to Rust types
let ruby_int = RubyValue::Integer(42);
let rust_int: i32 = ruby_int.into_rust_value().unwrap();

Dependencies

  • This crate has no external dependencies, making it lightweight and easy to integrate