Trait owner_monad::OwnerMut[][src]

pub trait OwnerMut<T: ?Sized> {
    fn with<'a, U>(&'a mut self, f: impl FnOnce(&mut T) -> U) -> Option<U>
    where
        T: 'a
; }

A monad which conditionally provides mutable access to a T value.

Required methods

fn with<'a, U>(&'a mut self, f: impl FnOnce(&mut T) -> U) -> Option<U> where
    T: 'a, 
[src]

Applies the given function to the contained value, if it exists.

Loading content...

Implementors

impl<T> OwnerMut<T> for PureOwner<T>[src]

impl<T, U, OT: OwnerMut<T>, OU: OwnerMut<U>, F: FnMut(&mut T) -> OU> OwnerMut<U> for BindOwner<&mut T, U, OT, OU, F>[src]

impl<T: ?Sized, O: ?Sized + OwnerMut<T>> OwnerMut<T> for &mut O[src]

Loading content...