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

pub struct PyContext {
    pub bytes_type: PyClassRef,
    pub bytesiterator_type: PyClassRef,
    pub bytearray_type: PyClassRef,
    pub bytearrayiterator_type: PyClassRef,
    pub bool_type: PyClassRef,
    pub classmethod_type: PyClassRef,
    pub code_type: PyClassRef,
    pub dict_type: PyClassRef,
    pub ellipsis_type: PyClassRef,
    pub enumerate_type: PyClassRef,
    pub filter_type: PyClassRef,
    pub float_type: PyClassRef,
    pub frame_type: PyClassRef,
    pub frozenset_type: PyClassRef,
    pub generator_type: PyClassRef,
    pub int_type: PyClassRef,
    pub iter_type: PyClassRef,
    pub complex_type: PyClassRef,
    pub true_value: PyIntRef,
    pub false_value: PyIntRef,
    pub list_type: PyClassRef,
    pub listiterator_type: PyClassRef,
    pub dictkeyiterator_type: PyClassRef,
    pub dictvalueiterator_type: PyClassRef,
    pub dictitemiterator_type: PyClassRef,
    pub dictkeys_type: PyClassRef,
    pub dictvalues_type: PyClassRef,
    pub dictitems_type: PyClassRef,
    pub map_type: PyClassRef,
    pub memoryview_type: PyClassRef,
    pub none: PyNoneRef,
    pub ellipsis: PyEllipsisRef,
    pub not_implemented: PyNotImplementedRef,
    pub tuple_type: PyClassRef,
    pub tupleiterator_type: PyClassRef,
    pub set_type: PyClassRef,
    pub staticmethod_type: PyClassRef,
    pub super_type: PyClassRef,
    pub str_type: PyClassRef,
    pub range_type: PyClassRef,
    pub rangeiterator_type: PyClassRef,
    pub slice_type: PyClassRef,
    pub type_type: PyClassRef,
    pub zip_type: PyClassRef,
    pub function_type: PyClassRef,
    pub builtin_function_or_method_type: PyClassRef,
    pub property_type: PyClassRef,
    pub readonly_property_type: PyClassRef,
    pub module_type: PyClassRef,
    pub namespace_type: PyClassRef,
    pub bound_method_type: PyClassRef,
    pub weakref_type: PyClassRef,
    pub weakproxy_type: PyClassRef,
    pub mappingproxy_type: PyClassRef,
    pub object: PyClassRef,
    pub exceptions: ExceptionZoo,
}

Fields

bytes_type: PyClassRefbytesiterator_type: PyClassRefbytearray_type: PyClassRefbytearrayiterator_type: PyClassRefbool_type: PyClassRefclassmethod_type: PyClassRefcode_type: PyClassRefdict_type: PyClassRefellipsis_type: PyClassRefenumerate_type: PyClassReffilter_type: PyClassReffloat_type: PyClassRefframe_type: PyClassReffrozenset_type: PyClassRefgenerator_type: PyClassRefint_type: PyClassRefiter_type: PyClassRefcomplex_type: PyClassReftrue_value: PyIntReffalse_value: PyIntReflist_type: PyClassReflistiterator_type: PyClassRefdictkeyiterator_type: PyClassRefdictvalueiterator_type: PyClassRefdictitemiterator_type: PyClassRefdictkeys_type: PyClassRefdictvalues_type: PyClassRefdictitems_type: PyClassRefmap_type: PyClassRefmemoryview_type: PyClassRefnone: PyNoneRefellipsis: PyEllipsisRefnot_implemented: PyNotImplementedReftuple_type: PyClassReftupleiterator_type: PyClassRefset_type: PyClassRefstaticmethod_type: PyClassRefsuper_type: PyClassRefstr_type: PyClassRefrange_type: PyClassRefrangeiterator_type: PyClassRefslice_type: PyClassReftype_type: PyClassRefzip_type: PyClassReffunction_type: PyClassRefbuiltin_function_or_method_type: PyClassRefproperty_type: PyClassRefreadonly_property_type: PyClassRefmodule_type: PyClassRefnamespace_type: PyClassRefbound_method_type: PyClassRefweakref_type: PyClassRefweakproxy_type: PyClassRefmappingproxy_type: PyClassRefobject: PyClassRefexceptions: ExceptionZoo

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 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 property_type(&self) -> PyClassRef[src]

pub fn readonly_property_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 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>>(&self, i: T) -> 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_module(&self, name: &str, dict: PyDictRef) -> PyObjectRef[src]

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

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

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

pub fn new_property<F, I, V>(&self, f: F) -> PyObjectRef where
    F: IntoPyNativeFunc<I, V>, 
[src]

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

pub fn new_function(
    &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_instance(
    &self,
    class: PyClassRef,
    dict: Option<PyDictRef>
) -> PyObjectRef
[src]

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

Trait Implementations

impl Default for PyContext[src]

impl Debug for PyContext[src]

Auto Trait Implementations

impl !Sync for PyContext

impl !Unpin for PyContext

impl !Send for PyContext

impl !UnwindSafe for PyContext

impl !RefUnwindSafe for PyContext

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self