Struct caffe2_imports::PyRefMut
source · pub struct PyRefMut<'p, T>where
T: PyClass<Frozen = False>,{ /* private fields */ }
Expand description
A wrapper type for a mutably borrowed value from aPyCell
<T>
.
See the module-level documentation for more information.
Implementations§
source§impl<'p, T, U> PyRefMut<'p, T>where
U: PyClass<Frozen = False>,
T: PyClass<BaseType = U, Frozen = False>,
impl<'p, T, U> PyRefMut<'p, T>where U: PyClass<Frozen = False>, T: PyClass<BaseType = U, Frozen = False>,
sourcepub fn into_super(self) -> PyRefMut<'p, U>
pub fn into_super(self) -> PyRefMut<'p, U>
Gets a PyRef<T::BaseType>
.
See PyRef::into_super
for more.
Trait Implementations§
source§impl<'p, T, U> AsMut<U> for PyRefMut<'p, T>where
U: PyClass<Frozen = False>,
T: PyClass<BaseType = U, Frozen = False>,
impl<'p, T, U> AsMut<U> for PyRefMut<'p, T>where U: PyClass<Frozen = False>, T: PyClass<BaseType = U, Frozen = False>,
source§impl<'a, T> AsPyPointer for PyRefMut<'a, T>where
T: PyClass<Frozen = False>,
impl<'a, T> AsPyPointer for PyRefMut<'a, T>where T: PyClass<Frozen = False>,
source§impl<'p, T, U> AsRef<U> for PyRefMut<'p, T>where
U: PyClass<Frozen = False>,
T: PyClass<BaseType = U, Frozen = False>,
impl<'p, T, U> AsRef<U> for PyRefMut<'p, T>where U: PyClass<Frozen = False>, T: PyClass<BaseType = U, Frozen = False>,
source§impl<'a, T> FromPyObject<'a> for PyRefMut<'a, T>where
T: PyClass<Frozen = False>,
impl<'a, T> FromPyObject<'a> for PyRefMut<'a, T>where T: PyClass<Frozen = False>,
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> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.