pub struct Value(/* private fields */);
Expand description
Boxed Ruby value in the Artichoke
interpreter.
Implementations§
Source§impl Value
impl Value
Sourcepub fn is_unreachable(&self) -> bool
pub fn is_unreachable(&self) -> bool
Whether a value is an interpreter-only variant not exposed to Ruby.
Some type tags like MRB_TT_UNDEF
are
internal to the mruby VM and manipulating them with the sys
API is
unspecified and may result in a segfault.
After extracting a sys::mrb_value
from the interpreter, check to see
if the value is unreachable a Fatal
exception.
See: mruby#4460.
Sourcepub fn is_dead(&self, interp: &mut Artichoke) -> bool
pub fn is_dead(&self, interp: &mut Artichoke) -> bool
Return whether this object is unreachable by any GC roots.
pub fn is_range( &self, interp: &mut Artichoke, len: i64, ) -> Result<Option<Range>, Error>
Trait Implementations§
Source§impl ConvertMut<Rand, Value> for Artichoke
impl ConvertMut<Rand, Value> for Artichoke
Source§fn convert_mut(&mut self, from: Rand) -> Value
fn convert_mut(&mut self, from: Rand) -> Value
Performs the infallible conversion.
Source§impl ConvertMut<Rand, Value> for Artichoke
impl ConvertMut<Rand, Value> for Artichoke
Source§fn convert_mut(&mut self, from: Rand) -> Value
fn convert_mut(&mut self, from: Rand) -> Value
Performs the infallible conversion.
Source§impl ConvertMut<Value, Options> for Artichoke
impl ConvertMut<Value, Options> for Artichoke
Source§fn convert_mut(&mut self, value: Value) -> Options
fn convert_mut(&mut self, value: Value) -> Options
Performs the infallible conversion.
Source§impl ConvertMut<Value, Value> for Artichoke
impl ConvertMut<Value, Value> for Artichoke
Source§fn convert_mut(&mut self, value: Value) -> Value
fn convert_mut(&mut self, value: Value) -> Value
Performs the infallible conversion.
Source§impl ConvertMut<f64, Value> for Artichoke
impl ConvertMut<f64, Value> for Artichoke
Source§fn convert_mut(&mut self, value: f64) -> Value
fn convert_mut(&mut self, value: f64) -> Value
Performs the infallible conversion.
Source§impl From<Value> for NoBlockGiven
impl From<Value> for NoBlockGiven
Source§impl Value for Value
impl Value for Value
Source§fn funcall(
&self,
interp: &mut Self::Artichoke,
func: &str,
args: &[Self::Arg],
block: Option<Self::Block>,
) -> Result<Self::Value, Self::Error>
fn funcall( &self, interp: &mut Self::Artichoke, func: &str, args: &[Self::Arg], block: Option<Self::Block>, ) -> Result<Self::Value, Self::Error>
Source§fn respond_to(
&self,
interp: &mut Self::Artichoke,
method: &str,
) -> Result<bool, Self::Error>
fn respond_to( &self, interp: &mut Self::Artichoke, method: &str, ) -> Result<bool, Self::Error>
Whether
self
responds to a method. Read moreSource§fn ruby_type(&self) -> Ruby
fn ruby_type(&self) -> Ruby
Return this values Rust-mapped type tag.
impl Copy for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)