Struct InstantiateResultObject

Source
pub struct InstantiateResultObject { /* private fields */ }

Trait Implementations§

Source§

impl IntoPy<PyObject> for InstantiateResultObject

Source§

fn into_py(self, py: Python<'_>) -> PyObject

Performs the conversion.
Source§

impl PyObjectAlloc for InstantiateResultObject

Source§

unsafe fn alloc(_py: Python<'_>) -> *mut PyObject

Source§

unsafe fn dealloc(py: Python<'_>, obj: *mut PyObject)

Calls the rust destructor for the object and frees the memory (usually by calling ptr->ob_type->tp_free). This function is used as tp_dealloc implementation.
Source§

unsafe fn drop(py: Python<'_>, obj: *mut PyObject)

Calls the rust destructor for the object.
Source§

impl PyTypeInfo for InstantiateResultObject

Source§

const NAME: &'static str = "InstantiateResultObject"

Class name
Source§

const MODULE: Option<&'static str> = None

Module name, if any
Source§

const DESCRIPTION: &'static str = "\u{0}"

Class doc string
Source§

const FLAGS: usize = 0usize

Type flags (ie PY_TYPE_FLAG_GC, PY_TYPE_FLAG_WEAKREF)
Source§

const SIZE: usize = 32usize

Size of the rust PyObject structure (PyObject + rust structure)
Source§

const OFFSET: isize = 16isize

Type instance offset inside PyObject structure
Source§

type Type = InstantiateResultObject

Type of objects to store in PyObject struct
Source§

type BaseType = PyAny

Base class
Source§

unsafe fn type_object() -> &'static mut PyTypeObject

PyTypeObject instance for this type, which might still need to be initialized
Source§

fn is_instance(object: &PyAny) -> bool

Check if *mut ffi::PyObject is instance of this type
Source§

fn is_exact_instance(object: &PyAny) -> bool

Check if *mut ffi::PyObject is exact instance of this type

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromPy<T> for T

Source§

fn from_py(t: T, _: Python<'_>) -> T

Performs the conversion.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> IntoPy<U> for T
where U: FromPy<T>,

Source§

default fn into_py(self, py: Python<'_>) -> U

Performs the conversion.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> PyMethodsProtocol for T
where T: PyMethodsInventoryDispatch,

Source§

fn py_methods() -> Vec<&'static PyMethodDefType>

Returns all methods that are defined for a class
Source§

impl<'v, T> PyTryFrom<'v> for T
where T: PyTypeInfo,

Source§

fn try_from<V>(value: V) -> Result<&'v T, PyDowncastError>
where V: Into<&'v PyAny>,

Cast from a concrete Python object type to PyObject.
Source§

fn try_from_exact<V>(value: V) -> Result<&'v T, PyDowncastError>
where V: Into<&'v PyAny>,

Cast from a concrete Python object type to PyObject. With exact type check.
Source§

fn try_from_mut<V>(value: V) -> Result<&'v mut T, PyDowncastError>
where V: Into<&'v PyAny>,

Cast from a concrete Python object type to PyObject.
Source§

fn try_from_mut_exact<V>(value: V) -> Result<&'v mut T, PyDowncastError>
where V: Into<&'v PyAny>,

Cast from a concrete Python object type to PyObject. With exact type check.
Source§

unsafe fn try_from_unchecked<V>(value: V) -> &'v T
where V: Into<&'v PyAny>,

Cast a PyAny to a specific type of PyObject. The caller must have already verified the reference is for this type.
Source§

unsafe fn try_from_mut_unchecked<V>(value: V) -> &'v mut T
where V: Into<&'v PyAny>,

Cast a PyAny to a specific type of PyObject. The caller must have already verified the reference is for this type.
Source§

impl<T> PyTypeCreate for T

Source§

fn create(py: Python<'_>) -> Result<PyRawObject, PyErr>

Create PyRawObject which can be initialized with rust value
Source§

impl<T> PyTypeObject for T

Source§

fn init_type() -> NonNull<PyTypeObject>

This function must make sure that the corresponding type object gets initialized exactly once and return it.
Source§

fn type_object() -> Py<PyType>

Returns the safe abstraction over the type object from PyTypeObject::init_type
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.