Expand description
Functions for interoperability with rb-sys.
These functions are provided to interface with the lower-level Ruby bindings provided by rb-sys. You may want to use rb-sys when:
- Magnus does not provide access to a Ruby API because the API can not be made safe & ergonomic.
- Magnus exposed the API in a way that does not work for your use case.
- The API just hasn’t been implemented yet.
Even if your are not in a position to contribute code to Magnus, please open an issue outlining your use case and the APIs you need whenever you find yourself reaching for this module.
Stability
Functions in this module are considered unstable. While there is no plan to alter or remove them, non-backwards compatible changes in this module will not necessarily be considered as SemVer major changes.
Safety
The unsafe functions in this module are capable of producing values that break the saftey guarantees of almost every other function in Magnus. Use them with care.
Functions
Attempts to catch cases of Rust unwinding, converting to a fatal Error
.
Convert rb_sys::ID
to magnus::value::Id
.
Calls the given closure, catching all cases of unwinding from Ruby
returning them as an Error
.
Convert magnus::value::Id
to rb_sys::ID
.
Convert magnus::Value
to rb_sys::VALUE
.
Convert rb_sys::VALUE
to magnus::Value
.