Add a note in output documentation for fields with refs to opaques
authorMatt Corallo <git@bluematt.me>
Tue, 28 Jun 2022 02:14:20 +0000 (02:14 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 28 Jun 2022 02:26:57 +0000 (02:26 +0000)
commitef521e155d142222012acc4b33a41e13c0bda6ee
tree680bb6f854373d362d25df75fb5d6cbfcee299a2
parent7b9fa4430067acbe2fdf999d65d67c9e55ed3f5a
Add a note in output documentation for fields with refs to opaques

Because we (probably shouldn't, but do) map "opaque" structs with
an `is_owned` field instead of having a dedicated reference type,
fields which are a `Deref<Struct>` are simply mapped as
`OpaqueMappedStruct`. This is confusing for downstream `lightning.h`
consumers as they cannot differentiate between a field that expects
to own a `Struct` and one which expects to own a reference to it.

This is worked around here by adding documentation which can be
matched on, though ultimately structs should move towards full
ownership.
c-bindings-gen/src/blocks.rs