[][src]Struct pyo3::pycell::PyRefMut

pub struct PyRefMut<'p, T: PyClass> { /* fields omitted */ }

Wraps a mutable borrowed reference to a value in a PyCell<T>.

See the PyCell and PyRef documentations for more.

Implementations

impl<'p, T: PyClass> PyRefMut<'p, T>[src]

pub fn py(&self) -> Python<'_>[src]

Returns Python token. This function is safe since PyRefMut has the same lifetime as a GILGuard.

impl<'p, T, U> PyRefMut<'p, T> where
    T: PyClass + PyTypeInfo<BaseType = U, BaseLayout = PyCellInner<U>>,
    U: PyClass
[src]

pub fn into_super(self) -> PyRefMut<'p, U>[src]

Get PyRef<T::BaseType>. See PyRef::into_super for more.

Trait Implementations

impl<'p, T, U> AsMut<U> for PyRefMut<'p, T> where
    T: PyClass + PyTypeInfo<BaseType = U, BaseLayout = PyCellInner<U>>,
    U: PyClass
[src]

impl<'a, T: PyClass> AsPyPointer for PyRefMut<'a, T>[src]

impl<'p, T, U> AsRef<U> for PyRefMut<'p, T> where
    T: PyClass + PyTypeInfo<BaseType = U, BaseLayout = PyCellInner<U>>,
    U: PyClass
[src]

impl<T: PyClass + Debug, '_> Debug for PyRefMut<'_, T>[src]

impl<'p, T: PyClass> Deref for PyRefMut<'p, T>[src]

type Target = T

The resulting type after dereferencing.

impl<'p, T: PyClass> DerefMut for PyRefMut<'p, T>[src]

impl<'p, T: PyClass> Drop for PyRefMut<'p, T>[src]

impl<'a, T> From<PyRefMut<'a, T>> for Py<T> where
    T: PyClass
[src]

impl<'a, T> FromPyObject<'a> for PyRefMut<'a, T> where
    T: PyClass
[src]

impl<T: PyClass, '_> IntoPy<Py<PyAny>> for PyRefMut<'_, T>[src]

impl<'a, T: PyClass> TryFrom<&'a PyCell<T>> for PyRefMut<'a, T>[src]

type Error = PyBorrowMutError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'p, T> !RefUnwindSafe for PyRefMut<'p, T>

impl<'p, T> !Send for PyRefMut<'p, T>

impl<'p, T> !Sync for PyRefMut<'p, T>

impl<'p, T> Unpin for PyRefMut<'p, T>

impl<'p, T> !UnwindSafe for PyRefMut<'p, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<'a, T> FromPyObject<'a> for T where
    T: PyClass + Clone
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.