jonas-schievink / rubble

(going to be a) BLE stack for embedded Rust
BSD Zero Clause License
396 stars 56 forks source link

Create constructor and value-getter for Attribute::value #139

Closed daboross closed 4 years ago

daboross commented 4 years ago

Fixes #134! This adds an Attribute::new function taking &[u8] and Attribute::value function returning the value as &[u8].

I've made this as a minimal change - I think it could be reasonable to add getters for the other fields for consistency, and/or make the fields private, but those aren't strictly necessary to fix this issue.

Let me know if there's anything else I can do with this!