pub struct GcRefMut<'a, T: ?Sized> { /* private fields */ }Expand description
A wrapper type for a mutably borrowed value from a GcCell<T>.
Implementations§
Source§impl<'a, T: ?Sized> GcRefMut<'a, T>
impl<'a, T: ?Sized> GcRefMut<'a, T>
Sourcepub fn try_map<V, F>(orig: GcRefMut<'a, T>, f: F) -> Option<GcRefMut<'a, V>>
pub fn try_map<V, F>(orig: GcRefMut<'a, T>, f: F) -> Option<GcRefMut<'a, V>>
Tries to make a new GcCellRefMut for a component of the borrowed data, returning None
if the mapping function returns None.
The GcCellRefMut is already mutably borrowed, so this cannot fail.
This is an associated function that needs to be used as
GcCellRefMut::map(...). A method would interfere with methods of the same
name on the contents of a GcCell used through Deref.
Sourcepub fn map<V, F>(orig: Self, f: F) -> GcRefMut<'a, V>
pub fn map<V, F>(orig: Self, f: F) -> GcRefMut<'a, V>
Makes a new GcCellRefMut for a component of the borrowed data, e.g., an enum
variant.
The GcCellRefMut is already mutably borrowed, so this cannot fail.
This is an associated function that needs to be used as
GcCellRefMut::map(...). A method would interfere with methods of the same
name on the contents of a GcCell used through Deref.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for GcRefMut<'a, T>
impl<'a, T> !Send for GcRefMut<'a, T>
impl<'a, T> !Sync for GcRefMut<'a, T>
impl<'a, T> !UnwindSafe for GcRefMut<'a, T>
impl<'a, T> Freeze for GcRefMut<'a, T>
impl<'a, T> Unpin for GcRefMut<'a, T>
impl<'a, T> UnsafeUnpin for GcRefMut<'a, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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