Expand description
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, Global>>
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
sourceimpl Artichoke
impl Artichoke
sourcepub const fn new(
mrb: NonNull<mrb_state>,
state: Box<State, Global>
) -> Artichoke
pub const fn new(
mrb: NonNull<mrb_state>,
state: Box<State, Global>
) -> Artichoke
Create a new interpreter from an underlying mrb
and a State
.
sourcepub fn protect(&mut self, value: Value) -> Value
pub fn protect(&mut self, value: Value) -> Value
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.
sourcepub unsafe fn with_ffi_boundary<F, T>(
&mut self,
func: F
) -> Result<T, InterpreterExtractError> where
F: FnOnce(*mut mrb_state) -> T,
pub unsafe fn with_ffi_boundary<F, T>(
&mut self,
func: F
) -> Result<T, InterpreterExtractError> where
F: FnOnce(*mut mrb_state) -> T,
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
.
sourcepub unsafe fn into_raw(interp: Artichoke) -> *mut mrb_state
pub unsafe fn into_raw(interp: Artichoke) -> *mut mrb_state
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
.
sourceimpl Artichoke
impl Artichoke
pub fn lookup_symbol_with_trailing_nul(
&self,
symbol: u32
) -> Result<Option<&[u8]>, Error>
pub fn intern_bytes_with_trailing_nul<T>(
&mut self,
bytes: T
) -> Result<u32, Error> where
T: Into<Cow<'static, [u8]>>,
pub fn check_interned_bytes_with_trailing_nul(
&self,
bytes: &[u8]
) -> Result<Option<u32>, Error>
Trait Implementations
sourceimpl ClassRegistry for Artichoke
impl ClassRegistry for Artichoke
sourcefn def_class<T>(
&mut self,
spec: <Artichoke as ClassRegistry>::Spec
) -> Result<(), <Artichoke as ClassRegistry>::Error> where
T: Any,
fn def_class<T>(
&mut self,
spec: <Artichoke as ClassRegistry>::Spec
) -> Result<(), <Artichoke as ClassRegistry>::Error> where
T: Any,
Create a class definition bound to a Rust type T
. Read more
sourcefn class_spec<T>(
&self
) -> Result<Option<&<Artichoke as ClassRegistry>::Spec>, <Artichoke as ClassRegistry>::Error> where
T: Any,
fn class_spec<T>(
&self
) -> Result<Option<&<Artichoke as ClassRegistry>::Spec>, <Artichoke as ClassRegistry>::Error> where
T: Any,
Retrieve a class definition from the state bound to Rust type T
. Read more
sourcefn class_of<T>(
&mut self
) -> Result<Option<<Artichoke as ClassRegistry>::Value>, <Artichoke as ClassRegistry>::Error> where
T: Any,
fn class_of<T>(
&mut self
) -> Result<Option<<Artichoke as ClassRegistry>::Value>, <Artichoke as ClassRegistry>::Error> where
T: Any,
Retrieve a boxed Ruby value containing a Class
object for the Class
bound to Rust type T
. Read more
sourcefn new_instance<T>(
&mut self,
args: &[<Artichoke as ClassRegistry>::Value]
) -> Result<Option<<Artichoke as ClassRegistry>::Value>, <Artichoke as ClassRegistry>::Error> where
T: Any,
fn new_instance<T>(
&mut self,
args: &[<Artichoke as ClassRegistry>::Value]
) -> Result<Option<<Artichoke as ClassRegistry>::Value>, <Artichoke as ClassRegistry>::Error> where
T: Any,
Create a new instance of the class bound to the Rust type T
. Read more
sourcefn is_class_defined<T>(&self) -> bool where
T: Any,
fn is_class_defined<T>(&self) -> bool where
T: Any,
Retrieve whether a class definition exists from the state bound to Rust type T
. Read more
sourceimpl CoerceToNumeric for Artichoke
impl CoerceToNumeric for Artichoke
sourcefn coerce_to_float(
&mut self,
value: <Artichoke as CoerceToNumeric>::Value
) -> Result<<Artichoke as CoerceToNumeric>::Float, <Artichoke as CoerceToNumeric>::Error>
fn coerce_to_float(
&mut self,
value: <Artichoke as CoerceToNumeric>::Value
) -> Result<<Artichoke as CoerceToNumeric>::Float, <Artichoke as CoerceToNumeric>::Error>
Coerce the given Ruby value to a Float
. Read more
sourceimpl ConvertMut<Float, Value> for Artichoke
impl ConvertMut<Float, Value> for Artichoke
sourcefn convert_mut(&mut self, from: Float) -> Value
fn convert_mut(&mut self, from: Float) -> Value
Performs the infallible conversion.
sourceimpl ConvertMut<Outcome, Value> for Artichoke
impl ConvertMut<Outcome, Value> for Artichoke
sourcefn convert_mut(&mut self, from: Outcome) -> Value
fn convert_mut(&mut self, from: Outcome) -> Value
Performs the infallible conversion.
sourceimpl ConvertMut<Rand, Value> for Artichoke
impl ConvertMut<Rand, Value> for Artichoke
sourcefn convert_mut(&mut self, from: Rand) -> Value
fn convert_mut(&mut self, from: Rand) -> Value
Performs the infallible conversion.
sourceimpl ConvertMut<Rand, Value> for Artichoke
impl ConvertMut<Rand, Value> for Artichoke
sourcefn convert_mut(&mut self, from: Rand) -> Value
fn convert_mut(&mut self, from: Rand) -> Value
Performs the infallible conversion.
sourceimpl ConvertMut<Value, Options> for Artichoke
impl ConvertMut<Value, Options> for Artichoke
sourcefn convert_mut(&mut self, value: Value) -> Options
fn convert_mut(&mut self, value: Value) -> Options
Performs the infallible conversion.
sourceimpl ConvertMut<Value, Value> for Artichoke
impl ConvertMut<Value, Value> for Artichoke
sourcefn convert_mut(&mut self, value: Value) -> Value
fn convert_mut(&mut self, value: Value) -> Value
Performs the infallible conversion.
sourceimpl ConvertMut<f64, Value> for Artichoke
impl ConvertMut<f64, Value> for Artichoke
sourcefn convert_mut(&mut self, value: f64) -> Value
fn convert_mut(&mut self, value: f64) -> Value
Performs the infallible conversion.
sourceimpl Debug for Artichoke
impl Debug for Artichoke
sourceimpl DefineConstant for Artichoke
impl DefineConstant for Artichoke
sourcefn define_global_constant(
&mut self,
constant: &str,
value: <Artichoke as DefineConstant>::Value
) -> Result<(), <Artichoke as DefineConstant>::Error>
fn define_global_constant(
&mut self,
constant: &str,
value: <Artichoke as DefineConstant>::Value
) -> Result<(), <Artichoke as DefineConstant>::Error>
Define a global constant. Read more
sourcefn define_class_constant<T>(
&mut self,
constant: &str,
value: <Artichoke as DefineConstant>::Value
) -> Result<(), <Artichoke as DefineConstant>::Error> where
T: 'static,
fn define_class_constant<T>(
&mut self,
constant: &str,
value: <Artichoke as DefineConstant>::Value
) -> Result<(), <Artichoke as DefineConstant>::Error> where
T: 'static,
Define a class constant. Read more
sourcefn define_module_constant<T>(
&mut self,
constant: &str,
value: <Artichoke as DefineConstant>::Value
) -> Result<(), <Artichoke as DefineConstant>::Error> where
T: 'static,
fn define_module_constant<T>(
&mut self,
constant: &str,
value: <Artichoke as DefineConstant>::Value
) -> Result<(), <Artichoke as DefineConstant>::Error> where
T: 'static,
Define a module constant. Read more
sourceimpl Eval for Artichoke
impl Eval for Artichoke
sourceimpl Globals for Artichoke
impl Globals for Artichoke
sourcefn unset_global_variable<T>(
&mut self,
name: T
) -> Result<(), <Artichoke as Globals>::Error> where
T: Into<Cow<'static, [u8]>>,
fn unset_global_variable<T>(
&mut self,
name: T
) -> Result<(), <Artichoke as Globals>::Error> where
T: Into<Cow<'static, [u8]>>,
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.
sourceimpl Hash for Artichoke
impl Hash for Artichoke
type Error = Error
type Error = Error
Concrete error type for errors encountered when retrieving the
interpreter’s global BuildHasher
. Read more
type GlobalBuildHasher = RandomState
type GlobalBuildHasher = RandomState
Concrete BuildHasher
type which is global to the interpreter.
sourcefn global_build_hasher(
&mut self
) -> Result<&<Artichoke as Hash>::GlobalBuildHasher, <Artichoke as Hash>::Error>
fn global_build_hasher(
&mut self
) -> Result<&<Artichoke as Hash>::GlobalBuildHasher, <Artichoke as Hash>::Error>
Retrieve the interpreter’s global BuildHasher
. Read more
sourceimpl Intern for Artichoke
impl Intern for Artichoke
sourceconst SYMBOL_RANGE_START: <Artichoke as Intern>::Symbol = {transmute(0x00000001): ::Symbol}
const SYMBOL_RANGE_START: <Artichoke as Intern>::Symbol = {transmute(0x00000001): ::Symbol}
The initial Symbol
index returned by the interner. Read more
sourcefn intern_bytes<T>(
&mut self,
bytes: T
) -> Result<<Artichoke as Intern>::Symbol, <Artichoke as Intern>::Error> where
T: Into<Cow<'static, [u8]>>,
fn intern_bytes<T>(
&mut self,
bytes: T
) -> Result<<Artichoke as Intern>::Symbol, <Artichoke as Intern>::Error> where
T: Into<Cow<'static, [u8]>>,
Store an immutable byte string for the life of the interpreter. Read more
sourcefn check_interned_bytes(
&self,
bytes: &[u8]
) -> Result<Option<<Artichoke as Intern>::Symbol>, <Artichoke as Intern>::Error>
fn check_interned_bytes(
&self,
bytes: &[u8]
) -> Result<Option<<Artichoke as Intern>::Symbol>, <Artichoke as Intern>::Error>
Check if a byte string is already interned and return its symbol
identifier. Return None
if the string has not been interned before. Read more
sourcefn lookup_symbol(
&self,
symbol: <Artichoke as Intern>::Symbol
) -> Result<Option<&[u8]>, <Artichoke as Intern>::Error>
fn lookup_symbol(
&self,
symbol: <Artichoke as Intern>::Symbol
) -> Result<Option<&[u8]>, <Artichoke as Intern>::Error>
Retrieve the original byte content of an interned byte string. Read more
sourcefn symbol_count(&self) -> usize
fn symbol_count(&self) -> usize
Retrieve the number of unique strings interned. Read more
sourceimpl Io for Artichoke
impl Io for Artichoke
sourcefn print(&mut self, message: &[u8]) -> Result<(), <Artichoke as Io>::Error>
fn print(&mut self, message: &[u8]) -> Result<(), <Artichoke as Io>::Error>
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.
sourceimpl LoadSources for Artichoke
impl LoadSources for Artichoke
sourcefn def_file_for_type<P, T>(
&mut self,
path: P
) -> Result<(), <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
T: File<Artichoke = <Artichoke as LoadSources>::Artichoke, Error = <Artichoke as LoadSources>::Exception>,
fn def_file_for_type<P, T>(
&mut self,
path: P
) -> Result<(), <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
T: File<Artichoke = <Artichoke as LoadSources>::Artichoke, Error = <Artichoke as LoadSources>::Exception>,
Add a Rust extension hook to the virtual file system. A stub Ruby file is
added to the file system and File::require
will dynamically define
Ruby items when invoked via Kernel#require
. Read more
sourcefn def_rb_source_file<P, T>(
&mut self,
path: P,
contents: T
) -> Result<(), <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
T: Into<Cow<'static, [u8]>>,
fn def_rb_source_file<P, T>(
&mut self,
path: P,
contents: T
) -> Result<(), <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
T: Into<Cow<'static, [u8]>>,
Add a Ruby source to the virtual file system. Read more
sourcefn resolve_source_path<P>(
&self,
path: P
) -> Result<Option<Vec<u8, Global>>, <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
fn resolve_source_path<P>(
&self,
path: P
) -> Result<Option<Vec<u8, Global>>, <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
Test for a source file at a path and return the absolute path of the resolved file. Read more
sourcefn source_is_file<P>(
&self,
path: P
) -> Result<bool, <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
fn source_is_file<P>(
&self,
path: P
) -> Result<bool, <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
Test for a source file at a path. Read more
sourcefn load_source<P>(
&mut self,
path: P
) -> Result<Loaded, <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
fn load_source<P>(
&mut self,
path: P
) -> Result<Loaded, <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
Load source located at the given path. Read more
sourcefn require_source<P>(
&mut self,
path: P
) -> Result<Required, <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
fn require_source<P>(
&mut self,
path: P
) -> Result<Required, <Artichoke as LoadSources>::Error> where
P: AsRef<Path>,
Require source located at the given path. Read more
sourceimpl ModuleRegistry for Artichoke
impl ModuleRegistry for Artichoke
sourcefn def_module<T>(
&mut self,
spec: <Artichoke as ModuleRegistry>::Spec
) -> Result<(), <Artichoke as ModuleRegistry>::Error> where
T: Any,
fn def_module<T>(
&mut self,
spec: <Artichoke as ModuleRegistry>::Spec
) -> Result<(), <Artichoke as ModuleRegistry>::Error> where
T: Any,
Create a module definition bound to a Rust type T
. Read more
sourcefn module_spec<T>(
&self
) -> Result<Option<&<Artichoke as ModuleRegistry>::Spec>, <Artichoke as ModuleRegistry>::Error> where
T: Any,
fn module_spec<T>(
&self
) -> Result<Option<&<Artichoke as ModuleRegistry>::Spec>, <Artichoke as ModuleRegistry>::Error> where
T: Any,
Retrieve a module definition from the interpreter bound to Rust type T
. Read more
sourcefn module_of<T>(
&mut self
) -> Result<Option<<Artichoke as ModuleRegistry>::Value>, <Artichoke as ModuleRegistry>::Error> where
T: Any,
fn module_of<T>(
&mut self
) -> Result<Option<<Artichoke as ModuleRegistry>::Value>, <Artichoke as ModuleRegistry>::Error> where
T: Any,
Retrieve a boxed Ruby value containing a Module
object for the
Module
bound to Rust type T
. Read more
sourcefn is_module_defined<T>(&self) -> bool where
T: Any,
fn is_module_defined<T>(&self) -> bool where
T: Any,
Retrieve whether a module definition exists from the interpreter bound
to Rust type T
Read more
sourceimpl MrbGarbageCollection for Artichoke
impl MrbGarbageCollection for Artichoke
sourcefn create_arena_savepoint(
&mut self
) -> Result<ArenaIndex<'_>, ArenaSavepointError>
fn create_arena_savepoint(
&mut self
) -> Result<ArenaIndex<'_>, ArenaSavepointError>
Create a savepoint in the GC arena. Read more
sourcefn live_object_count(&mut self) -> i32
fn live_object_count(&mut self) -> i32
Retrieve the number of live objects on the interpreter heap. Read more
sourcefn mark_value(&mut self, value: &Value) -> Result<(), Error>
fn mark_value(&mut self, value: &Value) -> Result<(), Error>
Mark a Value
as reachable in the mruby garbage collector.
sourceimpl Parser for Artichoke
impl Parser for Artichoke
sourcefn reset_parser(&mut self) -> Result<(), <Artichoke as Parser>::Error>
fn reset_parser(&mut self) -> Result<(), <Artichoke as Parser>::Error>
Reset parser state to initial values. Read more
sourcefn fetch_lineno(&self) -> Result<usize, <Artichoke as Parser>::Error>
fn fetch_lineno(&self) -> Result<usize, <Artichoke as Parser>::Error>
Fetch the current line number from the parser state. Read more
sourcefn add_fetch_lineno(
&mut self,
val: usize
) -> Result<usize, <Artichoke as Parser>::Error>
fn add_fetch_lineno(
&mut self,
val: usize
) -> Result<usize, <Artichoke as Parser>::Error>
Increment line number and return the new value. Read more
sourcefn push_context(
&mut self,
context: <Artichoke as Parser>::Context
) -> Result<(), <Artichoke as Parser>::Error>
fn push_context(
&mut self,
context: <Artichoke as Parser>::Context
) -> Result<(), <Artichoke as Parser>::Error>
Set the currently active context by modifying the parser stack. Read more
sourceimpl Prng for Artichoke
impl Prng for Artichoke
sourceimpl Regexp for Artichoke
impl Regexp for Artichoke
type Error = InterpreterExtractError
type Error = InterpreterExtractError
Concrete error type for errors encountered when manipulating Regexp
state. Read more
sourcefn active_regexp_globals(&self) -> Result<usize, <Artichoke as Regexp>::Error>
fn active_regexp_globals(&self) -> Result<usize, <Artichoke as Regexp>::Error>
Retrieve the current number of set Regexp
global variables. Read more
sourceimpl TryConvert<Seed, Value> for Artichoke
impl TryConvert<Seed, Value> for Artichoke
sourceimpl<T, U> TryConvert<T, U> for Artichoke where
Artichoke: Convert<T, U>,
impl<T, U> TryConvert<T, U> for Artichoke where
Artichoke: Convert<T, U>,
Provide a fallible converter for types that implement an infallible conversion.
sourcefn try_convert(
&self,
value: T
) -> Result<U, <Artichoke as TryConvert<T, U>>::Error>
fn try_convert(
&self,
value: T
) -> Result<U, <Artichoke as TryConvert<T, U>>::Error>
Blanket implementation that always succeeds by delegating to
Convert::convert
.
sourceimpl TryConvert<Value, Float> for Artichoke
impl TryConvert<Value, Float> for Artichoke
sourceimpl TryConvert<Value, Integer> for Artichoke
impl TryConvert<Value, Integer> for Artichoke
sourceimpl TryConvert<Value, bool> for Artichoke
impl TryConvert<Value, bool> for Artichoke
sourceimpl TryConvert<Value, f64> for Artichoke
impl TryConvert<Value, f64> for Artichoke
sourceimpl TryConvert<Value, i64> for Artichoke
impl TryConvert<Value, i64> for Artichoke
sourceimpl TryConvert<Value, u32> for Artichoke
impl TryConvert<Value, u32> for Artichoke
sourceimpl TryConvert<Value, usize> for Artichoke
impl TryConvert<Value, usize> for Artichoke
sourceimpl TryConvert<isize, Value> for Artichoke
impl TryConvert<isize, Value> for Artichoke
sourceimpl TryConvert<u64, Value> for Artichoke
impl TryConvert<u64, Value> for Artichoke
sourceimpl TryConvert<usize, Value> for Artichoke
impl TryConvert<usize, Value> for Artichoke
sourceimpl<'_> TryConvertMut<&'_ OsStr, Value> for Artichoke
impl<'_> TryConvertMut<&'_ OsStr, Value> for Artichoke
sourceimpl<'_> TryConvertMut<&'_ str, Value> for Artichoke
impl<'_> TryConvertMut<&'_ str, Value> for Artichoke
sourceimpl<'a> TryConvertMut<&'a mut Value, CaptureExtract<'a>> for Artichoke
impl<'a> TryConvertMut<&'a mut Value, CaptureExtract<'a>> for Artichoke
sourcefn try_convert_mut(
&mut self,
value: &'a mut Value
) -> Result<CaptureExtract<'a>, <Artichoke as TryConvertMut<&'a mut Value, CaptureExtract<'a>>>::Error>
fn try_convert_mut(
&mut self,
value: &'a mut Value
) -> Result<CaptureExtract<'a>, <Artichoke as TryConvertMut<&'a mut Value, CaptureExtract<'a>>>::Error>
Performs the fallible conversion. Read more
sourceimpl<'a> TryConvertMut<&'a mut Value, IntegerString<'a>> for Artichoke
impl<'a> TryConvertMut<&'a mut Value, IntegerString<'a>> for Artichoke
sourcefn try_convert_mut(
&mut self,
value: &'a mut Value
) -> Result<IntegerString<'a>, <Artichoke as TryConvertMut<&'a mut Value, IntegerString<'a>>>::Error>
fn try_convert_mut(
&mut self,
value: &'a mut Value
) -> Result<IntegerString<'a>, <Artichoke as TryConvertMut<&'a mut Value, IntegerString<'a>>>::Error>
Performs the fallible conversion. Read more
sourceimpl TryConvertMut<(Option<Value>, Option<Value>), (Option<Options>, Option<Encoding>)> for Artichoke
impl TryConvertMut<(Option<Value>, Option<Value>), (Option<Options>, Option<Encoding>)> for Artichoke
sourceimpl TryConvertMut<CaptureMatch, Value> for Artichoke
impl TryConvertMut<CaptureMatch, Value> for Artichoke
sourcefn try_convert_mut(
&mut self,
value: CaptureMatch
) -> Result<Value, <Artichoke as TryConvertMut<CaptureMatch, Value>>::Error>
fn try_convert_mut(
&mut self,
value: CaptureMatch
) -> Result<Value, <Artichoke as TryConvertMut<CaptureMatch, Value>>::Error>
Performs the fallible conversion. Read more
sourceimpl TryConvertMut<HashMap<Vec<u8, Global>, Vec<u8, Global>, RandomState>, Value> for Artichoke
impl TryConvertMut<HashMap<Vec<u8, Global>, Vec<u8, Global>, RandomState>, Value> for Artichoke
sourceimpl TryConvertMut<Option<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>>, Value> for Artichoke
impl TryConvertMut<Option<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>>, Value> for Artichoke
sourceimpl TryConvertMut<OsString, Value> for Artichoke
impl TryConvertMut<OsString, Value> for Artichoke
sourceimpl TryConvertMut<String, Value> for Artichoke
impl TryConvertMut<String, Value> for Artichoke
sourceimpl<T, U> TryConvertMut<T, U> for Artichoke where
Artichoke: ConvertMut<T, U>,
impl<T, U> TryConvertMut<T, U> for Artichoke where
Artichoke: ConvertMut<T, U>,
Provide a mutable fallible converter for types that implement an infallible conversion.
sourcefn try_convert_mut(
&mut self,
value: T
) -> Result<U, <Artichoke as TryConvertMut<T, U>>::Error>
fn try_convert_mut(
&mut self,
value: T
) -> Result<U, <Artichoke as TryConvertMut<T, U>>::Error>
Blanket implementation that always succeeds by delegating to
Convert::convert
.
sourceimpl<'a> TryConvertMut<Value, &'a str> for Artichoke
impl<'a> TryConvertMut<Value, &'a str> for Artichoke
sourceimpl TryConvertMut<Value, Encoding> for Artichoke
impl TryConvertMut<Value, Encoding> for Artichoke
type Error = InvalidEncodingError
type Error = InvalidEncodingError
Error type for failed conversions.
sourceimpl TryConvertMut<Value, Max> for Artichoke
impl TryConvertMut<Value, Max> for Artichoke
sourceimpl TryConvertMut<Value, Max> for Artichoke
impl TryConvertMut<Value, Max> for Artichoke
sourceimpl TryConvertMut<Value, Seed> for Artichoke
impl TryConvertMut<Value, Seed> for Artichoke
sourceimpl TryConvertMut<Value, String> for Artichoke
impl TryConvertMut<Value, String> for Artichoke
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more