[−][src]Struct bo_cell::RefMut
Methods
impl<'b, T: ?Sized> RefMut<'b, T>
[src]
pub fn map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> RefMut<'b, U> where
F: FnOnce(&mut T) -> &mut U,
[src]
F: FnOnce(&mut T) -> &mut 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(...)
.
pub fn split_tuple<U: ?Sized, V: ?Sized, F>(
orig: RefMut<'b, T>,
f: F
) -> (RefMut<'b, U>, RefMut<'b, V>) where
F: FnOnce(&mut T) -> (&mut U, &mut V),
[src]
orig: RefMut<'b, T>,
f: F
) -> (RefMut<'b, U>, RefMut<'b, V>) where
F: FnOnce(&mut T) -> (&mut U, &mut 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(...)
.
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>) where
F: FnOnce(&mut T) -> (&mut U, &mut V, &mut W),
[src]
orig: RefMut<'b, T>,
f: F
) -> (RefMut<'b, U>, RefMut<'b, V>, RefMut<'b, W>) where
F: FnOnce(&mut T) -> (&mut U, &mut V, &mut 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(...)
.
Trait Implementations
impl<'_, T: ?Sized> DerefMut for RefMut<'_, T>
[src]
impl<'_, T: ?Sized + Display> Display for RefMut<'_, T>
[src]
impl<'_, T: ?Sized> Deref for RefMut<'_, T>
[src]
Auto Trait Implementations
impl<'b, T> !Send for RefMut<'b, T>
impl<'b, T: ?Sized> Unpin for RefMut<'b, T>
impl<'b, T> !Sync for RefMut<'b, T>
impl<'b, T> !RefUnwindSafe for RefMut<'b, T>
impl<'b, T> !UnwindSafe for RefMut<'b, T>
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,