Trait librsnek::api::typing::BuiltinType
[−]
[src]
pub trait BuiltinType { type T; type V; fn init_type() -> Self; fn inject_selfref(_: Self::T) -> ObjectRef; fn alloc(value: Self::V) -> Self::T; fn new(&self, rt: &Runtime, value: Self::V) -> ObjectRef; }
The primordial trait from which all builtin Py*
types are
Associated Types
Required Methods
fn init_type() -> Self
Create the type and do any static initialization that may be needed
fn inject_selfref(_: Self::T) -> ObjectRef
fn alloc(value: Self::V) -> Self::T
Create an instance of the type ane return the struct that contains
fn new(&self, rt: &Runtime, value: Self::V) -> ObjectRef
Create a new instance of the primitve type that his reference counted
Implementors
impl BuiltinType for PyBooleanType
impl BuiltinType for PyBytesType
impl BuiltinType for PyCodeType
impl BuiltinType for PyComplexType
impl BuiltinType for PyDictType
impl BuiltinType for PyFloatType
impl BuiltinType for PyFrameType
impl BuiltinType for PyFrozenSetType
impl BuiltinType for PyIntegerType
impl BuiltinType for PyIteratorType
impl BuiltinType for PyListType
impl BuiltinType for PyFunctionType
impl BuiltinType for PyModuleType
impl BuiltinType for PyNoneType
impl BuiltinType for PyObjectType
impl BuiltinType for PyMeta
impl BuiltinType for PySetType
impl BuiltinType for PyStringType
impl BuiltinType for PyTupleType