Struct artichoke_backend::value::Value
source · pub struct Value(_);
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 PartialEq<Value> for Value
impl PartialEq<Value> for Value
source§impl TryConvertMut<HashMap<Vec<u8, Global>, Vec<u8, Global>, RandomState>, Value> for Artichoke
impl TryConvertMut<HashMap<Vec<u8, Global>, Vec<u8, Global>, RandomState>, Value> for Artichoke
source§impl TryConvertMut<Option<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>>, Value> for Artichoke
impl TryConvertMut<Option<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>>, Value> for Artichoke
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.
source§fn try_convert_into<T>(self, interp: &Self::Artichoke) -> Result<T, Self::Error>where
Self: Sized,
Self::Artichoke: TryConvert<Self, T, Error = Self::Error>,
fn try_convert_into<T>(self, interp: &Self::Artichoke) -> Result<T, Self::Error>where Self: Sized, Self::Artichoke: TryConvert<Self, T, Error = Self::Error>,
source§fn try_convert_into_mut<T>(
self,
interp: &mut Self::Artichoke
) -> Result<T, Self::Error>where
Self: Sized,
Self::Artichoke: TryConvertMut<Self, T, Error = Self::Error>,
fn try_convert_into_mut<T>( self, interp: &mut Self::Artichoke ) -> Result<T, Self::Error>where Self: Sized, Self::Artichoke: TryConvertMut<Self, T, Error = Self::Error>,
impl Copy for Value
Auto Trait Implementations§
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