pub struct RefMut<'b, T: ?Sized + 'b> { /* private fields */ }
Implementations§
Source§impl<'b, T: ?Sized> RefMut<'b, T>
impl<'b, T: ?Sized> RefMut<'b, T>
Sourcepub fn map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> RefMut<'b, U>
pub fn map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> RefMut<'b, U>
Makes a new RefMut
for a single component of the borrowed data, e.g., an enum
variant.
This is an associated function that needs to be used as RefMut::map(...)
.
Sourcepub fn split_tuple<U: ?Sized, V: ?Sized, F>(
orig: RefMut<'b, T>,
f: F,
) -> (RefMut<'b, U>, RefMut<'b, V>)
pub fn split_tuple<U: ?Sized, V: ?Sized, F>( orig: RefMut<'b, T>, f: F, ) -> (RefMut<'b, U>, RefMut<'b, V>)
Splits a RefMut
into a tuple of RefMut
s for different components of the
borrowed data.
Care must be taken to ensure that the resulting Shards
refer to non-overlapping components
of the parent RefMut
.
The underlying RefCell
will remain mutably borrowed until both
returned RefMut
s go out of scope.
This is an associated function that needs to be used a RefMut::split_tuple(...)
.
Sourcepub fn split_triple<U: ?Sized, V: ?Sized, W: ?Sized, F>(
orig: RefMut<'b, T>,
f: F,
) -> (RefMut<'b, U>, RefMut<'b, V>, RefMut<'b, W>)
pub fn split_triple<U: ?Sized, V: ?Sized, W: ?Sized, F>( orig: RefMut<'b, T>, f: F, ) -> (RefMut<'b, U>, RefMut<'b, V>, RefMut<'b, W>)
Splits a RefMut
into a triple of RefMut
s for different components of the
borrowed data.
Care must be taken to ensure that the resulting Shards
refer to non-overlapping components
of the parent RefMut
.
The underlying RefCell
will remain mutably borrowed until all three
returned RefMut
s go out of scope.
This is an associated function that needs to be used a RefMut::split_tuple(...)
.