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 PyBooleanTypeimpl BuiltinType for PyBytesTypeimpl BuiltinType for PyCodeTypeimpl BuiltinType for PyComplexTypeimpl BuiltinType for PyDictTypeimpl BuiltinType for PyFloatTypeimpl BuiltinType for PyFrameTypeimpl BuiltinType for PyFrozenSetTypeimpl BuiltinType for PyIntegerTypeimpl BuiltinType for PyIteratorTypeimpl BuiltinType for PyListTypeimpl BuiltinType for PyFunctionTypeimpl BuiltinType for PyModuleTypeimpl BuiltinType for PyNoneTypeimpl BuiltinType for PyObjectTypeimpl BuiltinType for PyMetaimpl BuiltinType for PySetTypeimpl BuiltinType for PyStringTypeimpl BuiltinType for PyTupleType