Tag `KVStore` `(C-not exported)` as `Writeable` isn't mapped 2022-07-110-bindings
authorMatt Corallo <git@bluematt.me>
Sun, 26 Jun 2022 18:14:30 +0000 (18:14 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 26 Jul 2022 23:09:04 +0000 (23:09 +0000)
Currently `Writeable` is mapped manually, making it impossible to
automatically map a trait method that is parameterized by
`Writeable` (as is true for the `write` method on `KVStore`).

Ultimately we'll want to move to automatically mapping `Writeable`
like any other trait (only manually mapping the std `Write` and
`Read` traits), so this is only a candidate for the bindings branch,
not upstream. That may take a few releases, however.

lightning/src/util/persist.rs

index c271ecc63c040b4e6af1a5fd40f7f304a682219d..feb9ca9a00455992cb8f3810d32a3aec8d96a0d9 100644 (file)
@@ -20,6 +20,7 @@ use super::{logger::Logger, ser::Writeable};
 /// Implementing `KVStorePersister` provides auto-implementations for [`Persister`]
 /// and [`Persist`] traits.  It uses "manager", "network_graph",
 /// and "monitors/{funding_txo_id}_{funding_txo_index}" for keys.
+/// (C-not exported)
 pub trait KVStorePersister {
        /// Persist the given writeable using the provided key
        fn persist<W: Writeable>(&self, key: &str, object: &W) -> io::Result<()>;