artichoke_backend::value

Struct Value

Source
pub struct Value(/* private fields */);
Expand description

Boxed Ruby value in the Artichoke interpreter.

Implementations§

Source§

impl Value

Source

pub fn new() -> Self

Create a new, empty Ruby value.

Alias for Value::default.

Source

pub fn nil() -> Self

Create a nil Ruby Value.

Source

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.

Source

pub fn is_dead(&self, interp: &mut Artichoke) -> bool

Return whether this object is unreachable by any GC roots.

Source

pub fn is_range( &self, interp: &mut Artichoke, len: i64, ) -> Result<Option<Range>, Error>

Trait Implementations§

Source§

impl Clone for Value

Source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Convert<Option<Value>, Value> for Artichoke

Source§

fn convert(&self, value: Option<Value>) -> Value

Performs the infallible conversion.
Source§

impl Convert<Option<bool>, Value> for Artichoke

Source§

fn convert(&self, value: Option<bool>) -> Value

Performs the infallible conversion.
Source§

impl Convert<Option<i64>, Value> for Artichoke

Source§

fn convert(&self, value: Option<i64>) -> Value

Performs the infallible conversion.
Source§

impl Convert<Value, Option<Value>> for Artichoke

Source§

fn convert(&self, value: Value) -> Option<Value>

Performs the infallible conversion.
Source§

impl Convert<Value, Value> for Artichoke

Source§

fn convert(&self, value: Value) -> Value

Performs the infallible conversion.
Source§

impl Convert<bool, Value> for Artichoke

Source§

fn convert(&self, value: bool) -> Value

Performs the infallible conversion.
Source§

impl Convert<i16, Value> for Artichoke

Source§

fn convert(&self, value: i16) -> Value

Performs the infallible conversion.
Source§

impl Convert<i32, Value> for Artichoke

Source§

fn convert(&self, value: i32) -> Value

Performs the infallible conversion.
Source§

impl Convert<i64, Value> for Artichoke

Source§

fn convert(&self, value: i64) -> Value

Performs the infallible conversion.
Source§

impl Convert<i8, Value> for Artichoke

Source§

fn convert(&self, value: i8) -> Value

Performs the infallible conversion.
Source§

impl Convert<u16, Value> for Artichoke

Source§

fn convert(&self, value: u16) -> Value

Performs the infallible conversion.
Source§

impl Convert<u32, Value> for Artichoke

Source§

fn convert(&self, value: u32) -> Value

Performs the infallible conversion.
Source§

impl Convert<u8, Value> for Artichoke

Source§

fn convert(&self, value: u8) -> Value

Performs the infallible conversion.
Source§

impl ConvertMut<Rand, Value> for Artichoke

Source§

fn convert_mut(&mut self, from: Rand) -> Value

Performs the infallible conversion.
Source§

impl ConvertMut<Rand, Value> for Artichoke

Source§

fn convert_mut(&mut self, from: Rand) -> Value

Performs the infallible conversion.
Source§

impl ConvertMut<Value, Options> for Artichoke

Source§

fn convert_mut(&mut self, value: Value) -> Options

Performs the infallible conversion.
Source§

impl ConvertMut<Value, Value> for Artichoke

Source§

fn convert_mut(&mut self, value: Value) -> Value

Performs the infallible conversion.
Source§

impl ConvertMut<f64, Value> for Artichoke

Source§

fn convert_mut(&mut self, value: f64) -> Value

Performs the infallible conversion.
Source§

impl Debug for Value

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Value

Source§

fn default() -> Value

Returns the “default value” for a type. Read more
Source§

impl From<Option<Value>> for Value

Source§

fn from(value: Option<Value>) -> Self

Converts to this type from the input type.
Source§

impl From<Option<mrb_value>> for Value

Source§

fn from(value: Option<mrb_value>) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for NoBlockGiven

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for mrb_value

Source§

fn from(value: Value) -> Self

Extract the inner sys::mrb_value from this Value.

Source§

impl From<mrb_value> for Value

Source§

fn from(value: mrb_value) -> Self

Construct a new Value from a sys::mrb_value.

Source§

impl PartialEq for Value

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryConvert<Option<usize>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: Option<usize>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<Value, Option<bool>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: Value) -> Result<Option<bool>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<Value, Option<i64>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: Value) -> Result<Option<i64>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<Value, bool> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: Value) -> Result<bool, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<Value, f64> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: Value) -> Result<f64, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<Value, i64> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: Value) -> Result<i64, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<Value, u32> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: Value) -> Result<u32, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<Value, usize> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: Value) -> Result<usize, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<isize, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: isize) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<u64, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: u64) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvert<usize, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert(&self, value: usize) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[&[u8]], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &[&[u8]]) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[&str], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &[&str]) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[Option<&[u8]>], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: &[Option<&[u8]>], ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[Option<&str>], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: &[Option<&str>], ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[Option<Value>], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: &[Option<Value>], ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[Option<Vec<u8>>], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: &[Option<Vec<u8>>], ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[String], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &[String]) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[Value], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &[Value]) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[Vec<u8>], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &[Vec<u8>]) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[i64], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &[i64]) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&[u8], Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &[u8]) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&OsStr, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &OsStr) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<&str, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: &str) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Cow<'a, [u8]>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Cow<'a, [u8]>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Cow<'a, OsStr>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Cow<'a, OsStr>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Cow<'a, str>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Cow<'a, str>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<HashMap<Vec<u8>, Vec<u8>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: HashMap<Vec<u8>, Vec<u8>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Option<&[u8]>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Option<&[u8]>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Option<&str>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Option<&str>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Option<HashMap<Vec<u8>, Option<Vec<u8>>>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Option<HashMap<Vec<u8>, Option<Vec<u8>>>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Option<String>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Option<String>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Option<Vec<u8>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Option<Vec<u8>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<OsString, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: OsString) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<String, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: String) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Value, &'a [u8]> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<&'a [u8], Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Value, &'a str> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<&'a str, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Encoding> for Artichoke

Source§

type Error = InvalidEncodingError

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<Encoding, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Max> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, max: Value) -> Result<Max, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Max> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, max: Value) -> Result<Max, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Value, Option<&'a [u8]>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Option<&'a [u8]>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Value, Option<&'a str>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Option<&'a str>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Option<Offset>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, options: Value, ) -> Result<Option<Offset>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Option<String>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Option<String>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Option<Vec<u8>>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Option<Vec<u8>>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, String> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<String, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Value, Vec<&'a [u8]>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Vec<&'a [u8]>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Value, Vec<&'a str>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<Vec<&'a str>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Vec<(Value, Value)>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Vec<(Value, Value)>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Value, Vec<Option<&'a [u8]>>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Vec<Option<&'a [u8]>>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl<'a> TryConvertMut<Value, Vec<Option<&'a str>>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Vec<Option<&'a str>>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Vec<Option<String>>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Vec<Option<String>>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Vec<Option<Vec<u8>>>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Value, ) -> Result<Vec<Option<Vec<u8>>>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Vec<String>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<Vec<String>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Vec<Value>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<Vec<Value>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Vec<Vec<u8>>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<Vec<Vec<u8>>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Vec<i64>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<Vec<i64>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Value, Vec<u8>> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Value) -> Result<Vec<u8>, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<&[u8]>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Vec<&[u8]>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<&str>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Vec<&str>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<(Value, Value)>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Vec<(Value, Value)>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<(Vec<u8>, Vec<i64>)>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Vec<(Vec<u8>, Vec<i64>)>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<Option<&[u8]>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Vec<Option<&[u8]>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<Option<&str>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Vec<Option<&str>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<Option<Vec<u8>>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Vec<Option<Vec<u8>>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<String>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Vec<String>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<Value>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Vec<Value>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<Vec<Option<&[u8]>>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Vec<Vec<Option<&[u8]>>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<Vec<Option<&str>>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Vec<Vec<Option<&str>>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<Vec<Option<Vec<u8>>>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut( &mut self, value: Vec<Vec<Option<Vec<u8>>>>, ) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<Vec<u8>>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Vec<Vec<u8>>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<i64>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Vec<i64>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl TryConvertMut<Vec<u8>, Value> for Artichoke

Source§

type Error = Error

Error type for failed conversions.
Source§

fn try_convert_mut(&mut self, value: Vec<u8>) -> Result<Value, Self::Error>

Performs the fallible conversion. Read more
Source§

impl Value for Value

Source§

type Artichoke = Artichoke

Concrete type for Artichoke interpreter.
Source§

type Arg = Value

Concrete type for arguments passed to funcall.
Source§

type Value = Value

Concrete type for results from funcall.
Source§

type Block = Value

Concrete type for blocks passed to funcall.
Source§

type Error = Error

Concrete error type for funcall errors.
Source§

fn funcall( &self, interp: &mut Self::Artichoke, func: &str, args: &[Self::Arg], block: Option<Self::Block>, ) -> Result<Self::Value, Self::Error>

Call a method on this Value with arguments and an optional block. Read more
Source§

fn freeze(&mut self, interp: &mut Self::Artichoke) -> Result<(), Self::Error>

Call #freeze on this Value. Read more
Source§

fn is_frozen(&self, interp: &mut Self::Artichoke) -> bool

Call #frozen? on this Value.
Source§

fn inspect(&self, interp: &mut Self::Artichoke) -> Vec<u8>

Call #inspect on this Value. Read more
Source§

fn is_nil(&self) -> bool

Whether self is nil
Source§

fn respond_to( &self, interp: &mut Self::Artichoke, method: &str, ) -> Result<bool, Self::Error>

Whether self responds to a method. Read more
Source§

fn to_s(&self, interp: &mut Self::Artichoke) -> Vec<u8>

Call #to_s on this Value. Read more
Source§

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>,

Consume self and try to convert self to type T using a TryConvert conversion. Read more
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>,

Consume self and try to convert self to type T using a TryConvertMut conversion. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.