GeezerVison is showing rustpython.github.io — rustpython_vm::VirtualMachine - Rust pub struct VirtualMachine {
pub builtins: PyObjectRef,
pub sys_module: PyObjectRef,
pub stdlib_inits: RefCell<HashMap<String, StdlibInitFunc>>,
pub ctx: PyContext,
pub frames: RefCell<Vec<PyRef<Frame>>>,
pub wasm_id: Option<String>,
pub exceptions: RefCell<Vec<PyBaseExceptionRef>>,
pub frozen: RefCell<HashMap<String, FrozenModule>>,
pub import_func: RefCell<PyObjectRef>,
pub profile_func: RefCell<PyObjectRef>,
pub trace_func: RefCell<PyObjectRef>,
pub use_tracing: RefCell<bool>,
pub signal_handlers: RefCell<[PyObjectRef; 64]>,
pub settings: PySettings,
pub recursion_limit: Cell<usize>,
pub codec_registry: RefCell<Vec<PyObjectRef>>,
pub initialized: bool,
}Top level container of a python virtual machine. In theory you could
create more instances of this struct and have them operate fully isolated.
Fieldsbuiltins: PyObjectRefsys_module: PyObjectRefstdlib_inits: RefCell<HashMap<String, StdlibInitFunc>>ctx: PyContextframes: RefCell<Vec<PyRef<Frame>>>wasm_id: Option<String>exceptions: RefCell<Vec<PyBaseExceptionRef>>frozen: RefCell<HashMap<String, FrozenModule>>import_func: RefCell<PyObjectRef>profile_func: RefCell<PyObjectRef>trace_func: RefCell<PyObjectRef>use_tracing: RefCell<bool>signal_handlers: RefCell<[PyObjectRef; 64]>settings: PySettingsrecursion_limit: Cell<usize>codec_registry: RefCell<Vec<PyObjectRef>>initialized: boolMethodsCreate a new VirtualMachine structure.
Create a new python string object.
Create a new python int object.
Create a new python bool object.
Instantiate an exception with arguments.
This function should only be used with builtin exception types; if a user-defined exception
type is passed in, it may not be fully initialized; try using exceptions::invoke
or exceptions::ExceptionCtor instead.
Instantiate an exception with no arguments.
This function should only be used with builtin exception types; if a user-defined exception
type is passed in, it may not be fully initialized; try using exceptions::invoke
or exceptions::ExceptionCtor instead.
Instantiate an exception with msg as the only argument.
This function should only be used with builtin exception types; if a user-defined exception
type is passed in, it may not be fully initialized; try using exceptions::invoke
or exceptions::ExceptionCtor instead.
Create a new python ValueError object. Useful for raising errors from
python functions implemented in rust.
Test whether a python object is None.
Determines if obj is an instance of cls, either directly, indirectly or virtually via
the instancecheck magic method.
Determines if subclass is a subclass of cls, either directly, indirectly or virtually
via the subclasscheck magic method.
May return exception, if __get__ descriptor raises one
Calls a method on obj passing arg, if the method exists.
Otherwise, or if the result is the special NotImplemented built-in constant,
calls unsupported to determine fallback value.
Calls a method, falling back to its reflection with the operands
reversed, and then to the value provided by unsupported.
For example: the following:
call_or_reflection(lhs, rhs, "__and__", "__rand__", unsupported)
- Calls
__and__ with lhs and rhs.
- If above is not implemented, calls
__rand__ with rhs and lhs.
- If above is not implemented, invokes
unsupported for the result.
CPython _PyObject_GenericGetAttrWithDict
Checks for triggered signals and calls the appropriate handlers. A no-op on
platforms where signals are not supported.
Trait ImplementationsReturns the "default value" for a type. Read more
Auto Trait ImplementationsBlanket Implementationsimpl<T> Any for T where T: 'static + ?Sized, [src]
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where U: From<T>, [src]
impl<T> Same<T> for T
impl<T, U> TryFrom<U> for T where U: Into<T>, [src]
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
impl<V, T> VZip<V> for T where V: MultiLane<T>,
|