fn pin_write_fn_factory(pin: Rc<LineState>) -> Box<dyn Fn(GpioPinValue)> {
    Box::from(move |bit| {
        let h = pin.handle.borrow_mut();
        let h = h.as_ref().unwrap();
        h.set_value(bit as u8).unwrap();
    })
}
/// Creates a function/closure for the given pin that changes the value of the pin.
Creates a function/closure for the given pin that changes the value of the pin.
Creates a function / closure for the given pin that changes the value of the pin .
fn pin_write_fn_factory(pin: Rc<LineState>) -> Box<dyn Fn(GpioPinValue)> {
    Box::from(move |bit| {
        let h = pin.handle.borrow_mut();
        let h = h.as_ref().unwrap();
        h.set_value(bit as u8).unwrap();
    })
}
fn pin_write_fn_factory ( pin : Rc < LineState > ) -> Box < dyn Fn ( GpioPinValue ) > { Box :: from ( move | bit | { let h = pin . handle . borrow_mut ( ) ; let h = h . as_ref ( ) . unwrap ( ) ; h . set_value ( bit as u8 ) . unwrap ( ) ; } ) }
Creates a function/closure for the given pin that changes the value of the pin.
Creates a function / closure for the given pin that changes the value of the pin .
pin
Rc<LineState>