[][src]Trait pyo3::type_object::PyDowncastImpl

pub unsafe trait PyDowncastImpl {
    unsafe fn unchecked_downcast(obj: &PyAny) -> &Self;
fn __private__(&self) -> PrivateMarker; }

Reference abstraction for PyClass and PyNativeType. Used internaly.

Required methods

unsafe fn unchecked_downcast(obj: &PyAny) -> &Self

Cast &PyAny to &Self without no type checking.

Safety

Unless obj is not an instance of a type corresponding to Self, this method causes undefined behavior.

fn __private__(&self) -> PrivateMarker

This trait is private to implement; this method exists to make it impossible to implement outside the crate.

Loading content...

Implementors

impl<'py, T> PyDowncastImpl for T where
    T: 'py + PyNativeType
[src]

impl<T: PyClass> PyDowncastImpl for PyCell<T>[src]

Loading content...