[][src]Struct rustpython_vm::pyobject::PyContext

pub struct PyContext {
    pub true_value: PyIntRef,
    pub false_value: PyIntRef,
    pub none: PyNoneRef,
    pub empty_tuple: PyTupleRef,
    pub ellipsis_type: PyClassRef,
    pub ellipsis: PyEllipsisRef,
    pub not_implemented: PyNotImplementedRef,
    pub types: TypeZoo,
    pub exceptions: ExceptionZoo,
    pub int_cache_pool: Vec<PyObjectRef>,
}

Fields

true_value: PyIntReffalse_value: PyIntRefnone: PyNoneRefempty_tuple: PyTupleRefellipsis_type: PyClassRefellipsis: PyEllipsisRefnot_implemented: PyNotImplementedReftypes: TypeZooexceptions: ExceptionZooint_cache_pool: Vec<PyObjectRef>

Methods

impl PyContext[src]

pub fn new() -> Self[src]

pub fn bytearray_type(&self) -> PyClassRef[src]

pub fn bytearrayiterator_type(&self) -> PyClassRef[src]

pub fn bytes_type(&self) -> PyClassRef[src]

pub fn bytesiterator_type(&self) -> PyClassRef[src]

pub fn code_type(&self) -> PyClassRef[src]

pub fn complex_type(&self) -> PyClassRef[src]

pub fn dict_type(&self) -> PyClassRef[src]

pub fn float_type(&self) -> PyClassRef[src]

pub fn frame_type(&self) -> PyClassRef[src]

pub fn int_type(&self) -> PyClassRef[src]

pub fn list_type(&self) -> PyClassRef[src]

pub fn listiterator_type(&self) -> PyClassRef[src]

pub fn listreverseiterator_type(&self) -> PyClassRef[src]

pub fn striterator_type(&self) -> PyClassRef[src]

pub fn strreverseiterator_type(&self) -> PyClassRef[src]

pub fn module_type(&self) -> PyClassRef[src]

pub fn namespace_type(&self) -> PyClassRef[src]

pub fn set_type(&self) -> PyClassRef[src]

pub fn range_type(&self) -> PyClassRef[src]

pub fn rangeiterator_type(&self) -> PyClassRef[src]

pub fn slice_type(&self) -> PyClassRef[src]

pub fn frozenset_type(&self) -> PyClassRef[src]

pub fn bool_type(&self) -> PyClassRef[src]

pub fn memoryview_type(&self) -> PyClassRef[src]

pub fn tuple_type(&self) -> PyClassRef[src]

pub fn tupleiterator_type(&self) -> PyClassRef[src]

pub fn iter_type(&self) -> PyClassRef[src]

pub fn enumerate_type(&self) -> PyClassRef[src]

pub fn filter_type(&self) -> PyClassRef[src]

pub fn map_type(&self) -> PyClassRef[src]

pub fn zip_type(&self) -> PyClassRef[src]

pub fn str_type(&self) -> PyClassRef[src]

pub fn super_type(&self) -> PyClassRef[src]

pub fn function_type(&self) -> PyClassRef[src]

pub fn builtin_function_or_method_type(&self) -> PyClassRef[src]

pub fn method_descriptor_type(&self) -> PyClassRef[src]

pub fn property_type(&self) -> PyClassRef[src]

pub fn readonly_property_type(&self) -> PyClassRef[src]

pub fn getset_type(&self) -> PyClassRef[src]

pub fn classmethod_type(&self) -> PyClassRef[src]

pub fn staticmethod_type(&self) -> PyClassRef[src]

pub fn generator_type(&self) -> PyClassRef[src]

pub fn bound_method_type(&self) -> PyClassRef[src]

pub fn weakref_type(&self) -> PyClassRef[src]

pub fn weakproxy_type(&self) -> PyClassRef[src]

pub fn traceback_type(&self) -> PyClassRef[src]

pub fn type_type(&self) -> PyClassRef[src]

pub fn none(&self) -> PyObjectRef[src]

pub fn ellipsis(&self) -> PyObjectRef[src]

pub fn not_implemented(&self) -> PyObjectRef[src]

pub fn object(&self) -> PyClassRef[src]

pub fn new_int<T: Into<BigInt> + ToPrimitive>(&self, i: T) -> PyObjectRef[src]

pub fn new_bigint(&self, i: &BigInt) -> PyObjectRef[src]

pub fn new_float(&self, value: f64) -> PyObjectRef[src]

pub fn new_complex(&self, value: Complex64) -> PyObjectRef[src]

pub fn new_str(&self, s: String) -> PyObjectRef[src]

pub fn new_bytes(&self, data: Vec<u8>) -> PyObjectRef[src]

pub fn new_bytearray(&self, data: Vec<u8>) -> PyObjectRef[src]

pub fn new_bool(&self, b: bool) -> PyObjectRef[src]

pub fn new_tuple(&self, elements: Vec<PyObjectRef>) -> PyObjectRef[src]

pub fn new_list(&self, elements: Vec<PyObjectRef>) -> PyObjectRef[src]

pub fn new_set(&self) -> PyObjectRef[src]

pub fn new_dict(&self) -> PyDictRef[src]

pub fn new_class(&self, name: &str, base: PyClassRef) -> PyClassRef[src]

pub fn new_namespace(&self) -> PyObjectRef[src]

pub fn new_function<F, T, R, VM>(&self, f: F) -> PyObjectRef where
    F: IntoPyNativeFunc<T, R, VM>, 
[src]

pub fn new_method<F, T, R, VM>(&self, f: F) -> PyObjectRef where
    F: IntoPyNativeFunc<T, R, VM>, 
[src]

pub fn new_classmethod<F, T, R, VM>(&self, f: F) -> PyObjectRef where
    F: IntoPyNativeFunc<T, R, VM>, 
[src]

pub fn new_readonly_getset<F, T>(
    &self,
    name: impl Into<String>,
    f: F
) -> PyObjectRef where
    F: IntoPyGetterFunc<T>, 
[src]

pub fn new_getset<G, S, T, U>(
    &self,
    name: impl Into<String>,
    g: G,
    s: S
) -> PyObjectRef where
    G: IntoPyGetterFunc<T>,
    S: IntoPySetterFunc<U>, 
[src]

pub fn new_code_object(&self, code: CodeObject) -> PyCodeRef[src]

pub fn new_pyfunction(
    &self,
    code_obj: PyCodeRef,
    scope: Scope,
    defaults: Option<PyTupleRef>,
    kw_only_defaults: Option<PyDictRef>
) -> PyObjectRef
[src]

pub fn new_bound_method(
    &self,
    function: PyObjectRef,
    object: PyObjectRef
) -> PyObjectRef
[src]

pub fn new_base_object(
    &self,
    class: PyClassRef,
    dict: Option<PyDictRef>
) -> PyObjectRef
[src]

pub fn unwrap_constant(&self, value: &Constant) -> PyObjectRef[src]

Trait Implementations

impl Debug for PyContext[src]

impl Default for PyContext[src]

Auto Trait Implementations

impl !RefUnwindSafe for PyContext

impl !Send for PyContext

impl !Sync for PyContext

impl Unpin for PyContext

impl !UnwindSafe for PyContext

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,