Struct artichoke_backend::prelude::Artichoke[][src]

pub struct Artichoke {
    pub mrb: NonNull<mrb_state>,
    pub state: Option<Box<State>>,
}

Interpreter instance.

Functionality is added to the interpreter via traits, for example, garbage collection or eval.

Fields

mrb: NonNull<mrb_state>

Underlying mruby interpreter.

This is an owned reference to the interpreter via a mutable pointer.

state: Option<Box<State>>

Interpreter state.

This field is an Option because the State is moved in and out of the Artichoke struct as the call graph crosses between Rust and C and C to Rust.

Implementations

impl Artichoke[src]

#[must_use]
pub const fn new(mrb: NonNull<mrb_state>, state: Box<State>) -> Self
[src]

Create a new interpreter from an underlying mrb and a State.

pub fn protect(&mut self, value: Value) -> Value[src]

Prevent the given value from being garbage collected.

Calls sys::mrb_gc_protect on this value which adds it to the GC arena. This object will remain in the arena until ArenaIndex::restore restores the arena to an index before this call to protect.

pub unsafe fn with_ffi_boundary<F, T>(
    &mut self,
    func: F
) -> Result<T, InterpreterExtractError> where
    F: FnOnce(*mut mrb_state) -> T, 
[src]

Execute a a closure by moving the State into the mrb instance.

This method prepares this interpreter to cross an FFI boundary. When the Artichoke implementation calls mruby FFI functions, the State must be moved into the sys::mrb_state userdata pointer.

Safety

This method moves the State out of this instance into the mrb instance. During this function’s execution, this instance may be partially initialized.

This function is only safe to call if the closure only calls FFI functions that use a raw *mut sys::mrb_state.

#[must_use]
pub unsafe fn into_raw(interp: Self) -> *mut mrb_state
[src]

Consume an interpreter and return the pointer to the underlying sys::mrb_state.

This function does not free any interpreter resources. Its intended use is to prepare the interpreter to cross over an FFI boundary.

This is an associated function and must be called as Artichoke::into_raw(interp).

Safety

After calling this function, the caller is responsible for properly freeing the memory occupied by the interpreter heap. The easiest way to do this is to call ffi::from_user_data with the returned pointer and then call Artichoke::close.

pub fn close(self)[src]

Consume an interpreter and free all live objects.

impl Artichoke[src]

pub fn lookup_symbol_with_trailing_nul(
    &self,
    symbol: u32
) -> Result<Option<&[u8]>, Error>
[src]

pub fn intern_bytes_with_trailing_nul<T>(
    &mut self,
    bytes: T
) -> Result<u32, Error> where
    T: Into<Cow<'static, [u8]>>, 
[src]

pub fn check_interned_bytes_with_trailing_nul(
    &self,
    bytes: &[u8]
) -> Result<Option<u32>, Error>
[src]

Trait Implementations

impl<'a> AsMut<Artichoke> for Guard<'a>[src]

fn as_mut(&mut self) -> &mut Artichoke[src]

Performs the conversion.

impl<'a> AsMut<Artichoke> for ArenaIndex<'a>[src]

fn as_mut(&mut self) -> &mut Artichoke[src]

Performs the conversion.

impl<'a> AsRef<Artichoke> for Guard<'a>[src]

fn as_ref(&self) -> &Artichoke[src]

Performs the conversion.

impl<'a> AsRef<Artichoke> for ArenaIndex<'a>[src]

fn as_ref(&self) -> &Artichoke[src]

Performs the conversion.

impl ClassRegistry for Artichoke[src]

fn def_class<T>(&mut self, spec: Spec) -> Result<(), Error> where
    T: Any
[src]

Create a class definition bound to a Rust type T.

Class definitions have the same lifetime as the State because the class def owns the mrb_data_type for the type, which must be long-lived.

fn class_spec<T>(&self) -> Result<Option<&Spec>, Error> where
    T: Any
[src]

Retrieve a class definition from the state bound to Rust type T.

This function returns None if type T has not had a class spec registered for it using ClassRegistry::def_class.

fn class_of<T>(&mut self) -> Result<Option<Value>, Error> where
    T: Any
[src]

fn new_instance<T>(&mut self, args: &[Value]) -> Result<Option<Value>, Error> where
    T: Any
[src]

fn is_class_defined<T>(&self) -> bool where
    T: Any
[src]

impl CoerceToNumeric for Artichoke[src]

type Value = Value

Concrete type of boxed Ruby value as inputs to coerce functions.

type Float = f64

Concrete float type to coerce values into, e.g. f64.

type Error = Error

Concrete error type for errors encountered when coercing values.

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

Coerce the given Ruby value to a Float. Read more

impl Convert<Integer, Value> for Artichoke[src]

fn convert(&self, from: Integer) -> Value[src]

Performs the infallible conversion.

impl Convert<Option<Value>, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<Option<bool>, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<Option<i64>, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<Value, Option<Value>> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<Value, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<bool, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<i16, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<i32, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<i64, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<i8, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<u16, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<u32, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Convert<u8, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl ConvertMut<&'_ [u8], Value> for Artichoke[src]

fn convert_mut(&mut self, value: &[u8]) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<&'_ str, Value> for Artichoke[src]

fn convert_mut(&mut self, value: &str) -> Value[src]

Performs the infallible conversion.

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

fn convert_mut(&mut self, value: Cow<'a, [u8]>) -> Value[src]

Performs the infallible conversion.

impl<'a> ConvertMut<Cow<'a, str>, Value> for Artichoke[src]

fn convert_mut(&mut self, value: Cow<'a, str>) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Float, Value> for Artichoke[src]

fn convert_mut(&mut self, from: Float) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<HashMap<Vec<u8, Global>, Vec<u8, Global>, RandomState>, Value> for Artichoke[src]

fn convert_mut(&mut self, value: HashMap<Vec<u8>, Vec<u8>>) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Option<&'_ [u8]>, Value> for Artichoke[src]

fn convert_mut(&mut self, value: Option<&[u8]>) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Option<&'_ str>, Value> for Artichoke[src]

fn convert_mut(&mut self, value: Option<&str>) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Option<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>>, Value> for Artichoke[src]

fn convert_mut(
    &mut self,
    value: Option<HashMap<Vec<u8>, Option<Vec<u8>>>>
) -> Value
[src]

Performs the infallible conversion.

impl ConvertMut<Option<String>, Value> for Artichoke[src]

fn convert_mut(&mut self, value: Option<String>) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Option<Vec<u8, Global>>, Value> for Artichoke[src]

fn convert_mut(&mut self, value: Option<Vec<u8>>) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Outcome, Value> for Artichoke[src]

fn convert_mut(&mut self, from: Outcome) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Rand, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl ConvertMut<Rand, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl ConvertMut<String, Value> for Artichoke[src]

fn convert_mut(&mut self, value: String) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Value, Options> for Artichoke[src]

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

Performs the infallible conversion.

impl ConvertMut<Value, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl ConvertMut<Vec<(Value, Value), Global>, Value> for Artichoke[src]

fn convert_mut(&mut self, value: Vec<(Value, Value)>) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<Vec<u8, Global>, Value> for Artichoke[src]

fn convert_mut(&mut self, value: Vec<u8>) -> Value[src]

Performs the infallible conversion.

impl ConvertMut<f64, Value> for Artichoke[src]

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

Performs the infallible conversion.

impl Debug for Artichoke[src]

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

Formats the value using the given formatter. Read more

impl Debug for Artichoke[src]

type Value = Value

Concrete type for return values from eval.

fn inspect_type_name_for_value(&mut self, value: Self::Value) -> &str[src]

Return a name for the given value’s type that is suitable for using in an Exception message. Read more

fn class_name_for_value(&mut self, value: Self::Value) -> &str[src]

Return the class name for the given value’s type. Read more

impl DefineConstant for Artichoke[src]

type Value = Value

Concrete type for Ruby values.

type Error = Error

Concrete error type for fallible operations.

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

Define a global constant. Read more

fn define_class_constant<T>(
    &mut self,
    constant: &str,
    value: Self::Value
) -> Result<(), Self::Error> where
    T: 'static, 
[src]

Define a class constant. Read more

fn define_module_constant<T>(
    &mut self,
    constant: &str,
    value: Self::Value
) -> Result<(), Self::Error> where
    T: 'static, 
[src]

Define a module constant. Read more

impl Eval for Artichoke[src]

type Value = Value

Concrete type for return values from eval.

type Error = Error

Concrete error type for eval functions.

fn eval(&mut self, code: &[u8]) -> Result<Self::Value, Self::Error>[src]

Eval code on the Artichoke interpreter using the current Context. Read more

fn eval_os_str(&mut self, code: &OsStr) -> Result<Self::Value, Self::Error>[src]

Eval code on the Artichoke interpreter using the current Context when given code as an OsStr. Read more

fn eval_file(&mut self, file: &Path) -> Result<Self::Value, Self::Error>[src]

Eval code on the Artichoke interpreter using a new file Context given a file path. Read more

impl Globals for Artichoke[src]

fn unset_global_variable<T>(&mut self, name: T) -> Result<(), Self::Error> where
    T: Into<Cow<'static, [u8]>>, 
[src]

Unset global variable pointed to by name.

Unsetting a global variable removes the name from the global storage table. Unset globals resolve to nil in the Ruby VM.

Unsetting a global that is currently unset is a no-op.

Errors

If the name is not a valid global name, an error is returned.

type Value = Value

Concrete value type for global variables.

type Error = Error

Concrete error type for failures manipulating global variables.

fn set_global_variable<T>(
    &mut self,
    name: T,
    value: &Self::Value
) -> Result<(), Self::Error> where
    T: Into<Cow<'static, [u8]>>, 
[src]

Set global variable pointed to by name to the given Ruby value. Read more

fn get_global_variable<T>(
    &mut self,
    name: T
) -> Result<Option<Self::Value>, Self::Error> where
    T: Into<Cow<'static, [u8]>>, 
[src]

Get the Ruby value stored in the global variable pointed to by name. Read more

impl Intern for Artichoke[src]

type Symbol = u32

Concrete type for symbol identifiers. Read more

type Error = Error

Concrete type for errors returned while interning symbols.

const SYMBOL_RANGE_START: Self::Symbol[src]

The initial Symbol index returned by the interner. Read more

fn intern_bytes<T>(&mut self, bytes: T) -> Result<Self::Symbol, Self::Error> where
    T: Into<Cow<'static, [u8]>>, 
[src]

Store an immutable bytestring for the life of the interpreter. Read more

fn check_interned_bytes(
    &self,
    bytes: &[u8]
) -> Result<Option<Self::Symbol>, Self::Error>
[src]

Check if a bytestring is already interned and return its symbol identifier. Return None if the string has not been interned before. Read more

fn lookup_symbol(
    &self,
    symbol: Self::Symbol
) -> Result<Option<&[u8]>, Self::Error>
[src]

Retrieve the original byte content of an interned bytestring. Read more

fn symbol_count(&self) -> usize[src]

Retrieve the number of unique strings interned. Read more

fn intern_string<T>(&mut self, symbol: T) -> Result<Self::Symbol, Self::Error> where
    T: Into<Cow<'static, str>>, 
[src]

Store an immutable string for the life of the interpreter. Read more

fn check_interned_string(
    &self,
    symbol: &str
) -> Result<Option<Self::Symbol>, Self::Error>
[src]

Check if a string is already interned and return its symbol identifier. Return None if the string has not been interned before. Read more

impl Io for Artichoke[src]

fn print<T: AsRef<[u8]>>(&mut self, message: T) -> Result<(), Self::Error>[src]

Writes the given bytes to the interpreter stdout stream.

This implementation delegates to the underlying output strategy.

Errors

If the output stream encounters an error, an error is returned.

fn puts<T: AsRef<[u8]>>(&mut self, message: T) -> Result<(), Self::Error>[src]

Writes the given bytes to the interpreter stdout stream followed by a newline.

This implementation delegates to the underlying output strategy.

Errors

If the output stream encounters an error, an error is returned.

type Error = Error

Concrete error type for errors encountered when reading and writing.

impl LoadSources for Artichoke[src]

type Artichoke = Self

Concrete type for interpreter.

type Error = Error

Concrete type for errors returned from filesystem IO.

type Exception = Error

Concrete type for errors returned by File::require.

fn def_file_for_type<P, T>(&mut self, path: P) -> Result<(), Self::Error> where
    P: AsRef<Path>,
    T: File<Artichoke = Self::Artichoke, Error = Self::Exception>, 
[src]

Add a Rust extension hook to the virtual filesystem. A stub Ruby file is added to the filesystem and File::require will dynamically define Ruby items when invoked via Kernel#require. Read more

fn def_rb_source_file<P, T>(
    &mut self,
    path: P,
    contents: T
) -> Result<(), Self::Error> where
    P: AsRef<Path>,
    T: Into<Cow<'static, [u8]>>, 
[src]

Add a Ruby source to the virtual filesystem. Read more

fn resolve_source_path<P>(
    &self,
    path: P
) -> Result<Option<Vec<u8>>, Self::Error> where
    P: AsRef<Path>, 
[src]

Test for a source file at a path and return the absolute path of the resolved file. Read more

fn source_is_file<P>(&self, path: P) -> Result<bool, Self::Error> where
    P: AsRef<Path>, 
[src]

Test for a source file at a path. Read more

fn load_source<P>(&mut self, path: P) -> Result<bool, Self::Error> where
    P: AsRef<Path>, 
[src]

Load source located at the given path. Read more

fn require_source<P>(&mut self, path: P) -> Result<bool, Self::Error> where
    P: AsRef<Path>, 
[src]

Require source located at the given path. Read more

fn read_source_file_contents<P>(
    &self,
    path: P
) -> Result<Cow<'_, [u8]>, Self::Error> where
    P: AsRef<Path>, 
[src]

Retrieve file contents for a source file. Read more

impl ModuleRegistry for Artichoke[src]

fn def_module<T>(&mut self, spec: Spec) -> Result<(), Error> where
    T: Any
[src]

Create a module definition bound to a Rust type T.

Module definitions have the same lifetime as the interpreter because the module def owns the mrb_data_type for the type, which must be long-lived.

fn module_spec<T>(&self) -> Result<Option<&Spec>, Error> where
    T: Any
[src]

Retrieve a module definition from the interpreter bound to Rust type T.

This function returns None if type T has not had a module spec registered for it using ModuleRegistry::def_module.

fn module_of<T>(&mut self) -> Result<Option<Value>, Error> where
    T: Any
[src]

fn is_module_defined<T>(&self) -> bool where
    T: Any
[src]

impl MrbGarbageCollection for Artichoke[src]

fn create_arena_savepoint(
    &mut self
) -> Result<ArenaIndex<'_>, ArenaSavepointError>
[src]

Create a savepoint in the GC arena. Read more

fn live_object_count(&mut self) -> i32[src]

Retrieve the number of live objects on the interpreter heap. Read more

fn mark_value(&mut self, value: &Value)[src]

Mark a Value as reachable in the mruby garbage collector.

fn incremental_gc(&mut self)[src]

Perform an incremental garbage collection. Read more

fn full_gc(&mut self)[src]

Perform a full garbage collection. Read more

fn enable_gc(&mut self) -> State[src]

Enable garbage collection. Read more

fn disable_gc(&mut self) -> State[src]

Disable garbage collection. Read more

impl Parser for Artichoke[src]

type Context = Context

Concrete type for parser context.

type Error = Error

Error type for Parser APIs.

fn reset_parser(&mut self) -> Result<(), Self::Error>[src]

Reset parser state to initial values. Read more

fn fetch_lineno(&self) -> Result<usize, Self::Error>[src]

Fetch the current line number from the parser state. Read more

fn add_fetch_lineno(&mut self, val: usize) -> Result<usize, Self::Error>[src]

Increment line number and return the new value. Read more

fn push_context(&mut self, context: Self::Context) -> Result<(), Self::Error>[src]

Set the currently active context by modifying the parser stack. Read more

fn pop_context(&mut self) -> Result<Option<Self::Context>, Self::Error>[src]

Remove the current active context and return it. Read more

fn peek_context(&self) -> Result<Option<&Self::Context>, Self::Error>[src]

Return a reference to the currently active context. Read more

impl Prng for Artichoke[src]

type Error = Error

Concrete type for PRNG errors.

type Prng = Random

Conrete type for the interpreter psuedorandom number generator.

fn prng(&self) -> Result<&Self::Prng, Self::Error>[src]

Return a shared reference to the interpreter psuedorandom number generator. Read more

fn prng_mut(&mut self) -> Result<&mut Self::Prng, Self::Error>[src]

Return a mutable reference to the interpreter psuedorandom number generator. Read more

impl Regexp for Artichoke[src]

type Error = InterpreterExtractError

Concrete error type for errors encountered when manipulating Regexp state. Read more

fn active_regexp_globals(&self) -> Result<usize, Self::Error>[src]

Retrieve the current number of set Regexp global variables. Read more

fn set_active_regexp_globals(&mut self, count: usize) -> Result<(), Self::Error>[src]

Set the current number of set Regexp global variables. Read more

fn clear_regexp(&mut self) -> Result<(), Self::Error>[src]

Clear all Regexp state. Read more

impl TopSelf for Artichoke[src]

type Value = Value

Concrete Value type.

fn top_self(&mut self) -> Value[src]

Return a Value-wrapped reference to “top self”. Read more

impl<T, U> TryConvert<T, U> for Artichoke where
    Artichoke: Convert<T, U>, 
[src]

Provide a fallible converter for types that implement an infallible conversion.

fn try_convert(&self, value: T) -> Result<U, Self::Error>[src]

Blanket implementation that always succeeds by delegating to Convert::convert.

type Error = Error

Error type for failed conversions.

impl TryConvert<Value, Float> for Artichoke[src]

type Error = Error

Error type for failed conversions.

fn try_convert(&self, value: Value) -> Result<Float, Self::Error>[src]

Performs the fallible conversion. Read more

impl TryConvert<Value, Integer> for Artichoke[src]

type Error = Error

Error type for failed conversions.

fn try_convert(&self, value: Value) -> Result<Integer, Self::Error>[src]

Performs the fallible conversion. Read more

impl TryConvert<Value, Option<bool>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<Value, Option<i64>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<Value, bool> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<Value, f64> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<Value, i64> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<Value, u32> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<Value, usize> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<isize, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<u64, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvert<usize, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<&'_ [Option<Vec<u8, Global>>], Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<&'_ [Value], Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<&'_ [Vec<u8, Global>], Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<&'_ OsStr, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl<'a> TryConvertMut<&'a mut Value, CaptureExtract<'a>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl<'a> TryConvertMut<&'a mut Value, IntegerString<'a>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<(Option<Value>, Option<Value>), (Option<Options>, Option<Encoding>)> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<CaptureMatch, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Option<Value>, Max> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Option<Value>, Max> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Option<Value>, Option<Radix>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Option<Value>, Seed> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<OsString, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Scan, Option<Value>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl<T, U> TryConvertMut<T, U> for Artichoke where
    Artichoke: ConvertMut<T, U>, 
[src]

Provide a mutable fallible converter for types that implement an infallible conversion.

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

Blanket implementation that always succeeds by delegating to Convert::convert.

type Error = Error

Error type for failed conversions.

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Encoding> for Artichoke[src]

type Error = InvalidEncodingError

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Max> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Max> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Option<String>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Seed> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl<'a> TryConvertMut<Value, Vec<&'a str, Global>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Vec<(Value, Value), Global>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl<'a> TryConvertMut<Value, Vec<Option<&'a str>, Global>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Vec<Option<String>, Global>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Vec<String, Global>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Vec<Value, Global>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Value, Vec<i64, Global>> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<&'_ [u8], Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<&'_ str, Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<(Vec<u8, Global>, Vec<i64, Global>), Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<Option<&'_ [u8]>, Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<Option<&'_ str>, Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<String, Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<Value, Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<Vec<Option<&'_ [u8]>, Global>, Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<Vec<Option<&'_ str>, Global>, Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

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

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl TryConvertMut<Vec<i64, Global>, Value> for Artichoke[src]

type Error = Error

Error type for failed conversions.

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

Performs the fallible conversion. Read more

impl Warn for Artichoke[src]

type Error = Error

Concrete error type for errors encountered when outputting warnings.

fn warn(&mut self, message: &[u8]) -> Result<(), Self::Error>[src]

Emit a warning message using Warning#warn. Read more

Auto Trait Implementations

impl RefUnwindSafe for Artichoke

impl !Send for Artichoke

impl !Sync for Artichoke

impl Unpin for Artichoke

impl UnwindSafe for Artichoke

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> InternerAllSymbols for T where
    T: Intern<Symbol = U>,
    U: Copy + Into<u32>, 
[src]

pub fn all_symbols(&self) -> AllSymbols[src]

Returns an iterator that returns all symbol identifiers stored in an interner as Symbols. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

pub fn vzip(self) -> V[src]