[−][src]Struct rustpython_vm::pyobject::PyContext
Fields
true_value: PyIntRef
false_value: PyIntRef
none: PyNoneRef
empty_tuple: PyTupleRef
ellipsis_type: PyClassRef
ellipsis: PyEllipsisRef
not_implemented: PyNotImplementedRef
types: TypeZoo
exceptions: ExceptionZoo
int_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]
F: IntoPyNativeFunc<T, R, VM>,
pub fn new_method<F, T, R, VM>(&self, f: F) -> PyObjectRef where
F: IntoPyNativeFunc<T, R, VM>,
[src]
F: IntoPyNativeFunc<T, R, VM>,
pub fn new_classmethod<F, T, R, VM>(&self, f: F) -> PyObjectRef where
F: IntoPyNativeFunc<T, R, VM>,
[src]
F: IntoPyNativeFunc<T, R, VM>,
pub fn new_readonly_getset<F, T>(
&self,
name: impl Into<String>,
f: F
) -> PyObjectRef where
F: IntoPyGetterFunc<T>,
[src]
&self,
name: impl Into<String>,
f: F
) -> PyObjectRef where
F: IntoPyGetterFunc<T>,
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]
&self,
name: impl Into<String>,
g: G,
s: S
) -> PyObjectRef where
G: IntoPyGetterFunc<T>,
S: IntoPySetterFunc<U>,
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]
&self,
code_obj: PyCodeRef,
scope: Scope,
defaults: Option<PyTupleRef>,
kw_only_defaults: Option<PyDictRef>
) -> PyObjectRef
pub fn new_bound_method(
&self,
function: PyObjectRef,
object: PyObjectRef
) -> PyObjectRef
[src]
&self,
function: PyObjectRef,
object: PyObjectRef
) -> PyObjectRef
pub fn new_base_object(
&self,
class: PyClassRef,
dict: Option<PyDictRef>
) -> PyObjectRef
[src]
&self,
class: PyClassRef,
dict: Option<PyDictRef>
) -> PyObjectRef
pub fn unwrap_constant(&self, value: &Constant) -> PyObjectRef
[src]
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,