project-chip / rs-matter

Rust implementation of the Matter protocol. Status: Experimental
Apache License 2.0
310 stars 43 forks source link

Add support for `to_tlv` for unit enums #140

Closed andy31415 closed 5 months ago

andy31415 commented 5 months ago

This allows enum Foo {Bar, Baz} to derive ToTLV. Instead of assuming a sub-structure, this just does a raw value write. We also support enum16 as a result, as enumeration values may be 16-bit.