Work on the Attribute module
Currently a draft, any comments are welcome!
Oh, and I forgot to cargo fmt. I will do it after, I just didn't want to screw something up.
Next up I will try to document GattServer and stuff related to it. Then I will:
- try to split the
AttributeDataread and write functionality into a separate trait - try to make
ServiceBuilder::add_characteristic_internalpublic, but use the trait I added as a dyn type.
Also, related issues: #98 #35
I have no idea how the error[E0597]: bat_level does not live long enough error came to be in example/apps/ble_bas_peripheral.rs. I would like some help with this. I don't think that I've yet changed anything in how the AttributeData works...
I have no idea how the
error[E0597]: bat_level does not live long enougherror came to be inexample/apps/ble_bas_peripheral.rs. I would like some help with this. I don't think that I've yet changed anything in how theAttributeDataworks...
I encountered similar error before, see #95 . But I'm not sure whether this is your case. There're some complex lifetime calculations.
The attribute modules have changed a lot since this initial PR, and I think some of the original feature requests around making the attribute server optional (supported) as well as more control over how to handle/reject requests in attribute server is resolved. Is there a reason to keep this open?