[−][src]Struct take_mut::scoped::Scope
Represents a scope within which, it is possible to take a T from a &mut T as long as the &mut T outlives the scope.
Implementations
impl<'s> Scope<'s>[src]
pub fn take_or_recover<'c, 'm: 's, T: 'm, F: FnOnce() -> T>(
&'c self,
mut_ref: &'m mut T,
recovery: F
) -> (T, Hole<'c, 'm, T, F>)[src]
&'c self,
mut_ref: &'m mut T,
recovery: F
) -> (T, Hole<'c, 'm, T, F>)
Takes a (T, Hole<'c, 'm, T, F>) from an &'m mut T.
If the Hole is dropped without being filled, either due to panic or forgetting to fill, will run the recovery function to obtain a T to fill itself with.
pub fn take<'c, 'm: 's, T: 'm>(
&'c self,
mut_ref: &'m mut T
) -> (T, Hole<'c, 'm, T, fn() -> T>)[src]
&'c self,
mut_ref: &'m mut T
) -> (T, Hole<'c, 'm, T, fn() -> T>)
Takes a (T, Hole<'c, 'm, T, F>) from an &'m mut T.
Auto Trait Implementations
impl<'s> !RefUnwindSafe for Scope<'s>
impl<'s> Send for Scope<'s>
impl<'s> !Sync for Scope<'s>
impl<'s> Unpin for Scope<'s>
impl<'s> !UnwindSafe for Scope<'s>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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>,