You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, the accessor functions (e.g. get_protocol) that are generated require the AsMut<[u8]> trait. Is there something I'm not doing correctly?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
mlr-msft
changed the title
Question about Immutability
Question About Working with Immutable Data
Jun 7, 2019
Ti use the getter and setter require that the type implement BitRange (and Bit for single bit field). And the implementation only exist for T: AsMut<[$slice_ty]> + AsRef<[$slice_ty] at the moment.
So yes, currently the getter will also require AsMut<[u8]>.
Maybe, I should split the BitRange trait in two (Only with a getter and one with a setter). And only require the necessary one of the two for each method.
dzamlo
changed the title
Question About Working with Immutable Data
Make getters work with immutable Data
Jun 9, 2019
I'd like to be able to work with immutable data. e.g.:
Unfortunately, the accessor functions (e.g.
get_protocol
) that are generated require theAsMut<[u8]>
trait. Is there something I'm not doing correctly?Thanks in advance.
The text was updated successfully, but these errors were encountered: