[][src]Struct bo_cell::RefMut

pub struct RefMut<'b, T: ?Sized + 'b> { /* fields omitted */ }

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]

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]

Splits a RefMut into a tuple of RefMuts 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 RefMuts 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]

Splits a RefMut into a triple of RefMuts 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 RefMuts 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> Deref for RefMut<'_, T>[src]

type Target = T

The resulting type after dereferencing.

impl<'_, T: ?Sized + Display> Display for RefMut<'_, T>[src]

Auto Trait Implementations

impl<'b, T: ?Sized> Unpin for RefMut<'b, T>

impl<'b, T> !Sync for RefMut<'b, T>

impl<'b, T> !Send for RefMut<'b, T>

impl<'b, T> !UnwindSafe for RefMut<'b, T>

impl<'b, T> !RefUnwindSafe for RefMut<'b, T>

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

impl<T> From<T> for 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.

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

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

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