quartiq / miniconf

Rust serialize/deserialize/access reflection for trees (no_std, no alloc)
MIT License
25 stars 3 forks source link

setter/getter #199

Closed jordens closed 5 months ago

jordens commented 5 months ago
jordens commented 5 months ago

You mean in the case of a internal setter not doing some roll-back and returning Error::InvalidInternal? The onus is on the user to hold up contracts that ensure validity of their structs. They have the tools (a &mut self). I don't yet have a clear use case for internal setters/getters though. Supporting them just seemed natural.

ryan-summers commented 5 months ago

Yeah my main question was how miniconf-mqtt would handle it. Does it properly get forwarded up the error chain, or is it unwrapped?

Also, do we need to update miniconf-mqtt to use the getters?

jordens commented 5 months ago

It all gets returned cleanly. No unwraps. This is all transparent to miniconf-mqtt.