pub struct Ruby;
Expand description
Wrapper around the Ruby VM.
Implementations§
Source§impl Ruby
impl Ruby
Sourcepub fn init() -> Result<(), Error>
pub fn init() -> Result<(), Error>
Initialize the Ruby VM.
Safe to call multiple times. The VM is initialized only once.
Sourcepub fn load_app(path: impl AsRef<Path> + Copy) -> Result<(), Error>
pub fn load_app(path: impl AsRef<Path> + Copy) -> Result<(), Error>
Preload the Rack app into memory. Run this before trying to run anything else.
Sourcepub fn eval(code: &str) -> Result<Value, Error>
pub fn eval(code: &str) -> Result<Value, Error>
Run some Ruby code. If an exception is thrown, return the error.
Sourcepub fn gc_disable()
pub fn gc_disable()
Disable the garbage collector.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ruby
impl RefUnwindSafe for Ruby
impl Send for Ruby
impl Sync for Ruby
impl Unpin for Ruby
impl UnwindSafe for Ruby
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more