pub struct Value(_);
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<Value> for Value

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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, Global>>], Value> for Artichoke

§

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

§

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

§

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, Global>], Value> for Artichoke

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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, Global>, Vec<u8, Global>, RandomState>, Value> for Artichoke

§

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

§

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

§

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, Global>, Option<Vec<u8, Global>>, RandomState>>, Value> for Artichoke

§

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

§

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, Global>>, Value> for Artichoke

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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, Global>>> for Artichoke

§

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

§

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], Global>> for Artichoke

§

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, Global>> for Artichoke

§

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), Global>> for Artichoke

§

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]>, Global>> for Artichoke

§

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>, Global>> for Artichoke

§

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>, Global>> for Artichoke

§

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, Global>>, Global>> for Artichoke

§

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, Global>> for Artichoke

§

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, Global>> for Artichoke

§

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, Global>, Global>> for Artichoke

§

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, Global>> for Artichoke

§

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, Global>> for Artichoke

§

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], Global>, Value> for Artichoke

§

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, Global>, Value> for Artichoke

§

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), Global>, Value> for Artichoke

§

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, Global>, Vec<i64, Global>), Global>, Value> for Artichoke

§

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]>, Global>, Value> for Artichoke

§

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>, Global>, Value> for Artichoke

§

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, Global>>, Global>, Value> for Artichoke

§

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, Global>, Value> for Artichoke

§

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, Global>, Value> for Artichoke

§

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]>, Global>, Global>, Value> for Artichoke

§

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>, Global>, Global>, Value> for Artichoke

§

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, Global>>, Global>, Global>, Value> for Artichoke

§

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, Global>, Global>, Value> for Artichoke

§

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, Global>, Value> for Artichoke

§

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, Global>, Value> for Artichoke

§

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

§

type Artichoke = Artichoke

Concrete type for Artichoke interpreter.
§

type Arg = Value

Concrete type for arguments passed to funcall.
§

type Value = Value

Concrete type for results from funcall.
§

type Block = Value

Concrete type for blocks passed to funcall.
§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere
    T: Clone,

§

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 Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.