fn pin_write_fn_factory(pin: Rc<RefCell<Option<PinKind>>>) -> Box<dyn Fn(GpioPinValue)> {
    Box::from(move |bit| {
        let mut pin = pin.borrow_mut();
        let pin = pin.as_mut().unwrap();
        let pin = pin.out_pin();
        pin.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<RefCell<Option<PinKind>>>) -> Box<dyn Fn(GpioPinValue)> {
    Box::from(move |bit| {
        let mut pin = pin.borrow_mut();
        let pin = pin.as_mut().unwrap();
        let pin = pin.out_pin();
        pin.set_value(bit as u8).unwrap();
    })
}
fn pin_write_fn_factory ( pin : Rc < RefCell < Option < PinKind > > > ) -> Box < dyn Fn ( GpioPinValue ) > { Box :: from ( move | bit | { let mut pin = pin . borrow_mut ( ) ; let pin = pin . as_mut ( ) . unwrap ( ) ; let pin = pin . out_pin ( ) ; pin . 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<RefCell<Option<PinKind>>>