fn not(self) -> Then<Self, Not, B>
    where
        Self: Sized,
        B: Sized + Into<bool> + Copy,
        bool: Into<B>,
    {
        self.then(Not)
    }
/// A lens that reverses a boolean value
///
/// # Examples
///
/// ```
/// # use druid::*;
/// use druid::LensExt;
///
/// #[derive(Lens)]
/// struct MyThing {
///     first: bool
/// }
///
/// let lens = MyThing::first.not();
/// let mut val = MyThing { first: false };
/// assert_eq!(lens.with(&val, |v| *v), true);
/// lens.with_mut(&mut val, |v| *v = false);
/// assert_eq!(val.first, true);
/// ```
A lens that reverses a boolean value
A lens that reverses a boolean value
fn not(self) -> Then<Self, Not, B>
    where
        Self: Sized,
        B: Sized + Into<bool> + Copy,
        bool: Into<B>,
    {
        self.then(Not)
    }
fn not ( self ) -> Then < Self , Not , B > where Self : Sized , B : Sized + Into < bool > + Copy , bool : Into < B > , { self . then ( Not ) }
A lens that reverses a boolean value
A lens that reverses a boolean value
self
self
examples
None
use druid::*;
None
[derive(lens)]
struct MyThing {
first: bool
}

let lens = MyThing::first.not();
let mut val = MyThing { first: false };
assert_eq!(lens.with(&val, |v| *v), true);
lens.with_mut(&mut val, |v| *v = false);
assert_eq!(val.first, true);
```
struct MyThing { first : bool } let lens = MyThing :: first . not () ; let mut val = MyThing { first : false } ; assert_eq! ( lens . with ( &val |v| * v ) true ) ; lens . with_mut ( &mut val |v| * v = false ) ; assert_eq! ( val . first true ) ; ` ` `