No-export un-exportable types in BOLT12 module
authorMatt Corallo <git@bluematt.me>
Wed, 19 Jul 2023 20:02:10 +0000 (20:02 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 20 Jul 2023 21:43:52 +0000 (21:43 +0000)
We missed one method that now cannot be bindings exported - the
`payment_paths` method, as it returns a slice of objects, which
cannot be supported in bindings.

lightning/src/offers/invoice.rs

index 279e31dd66a78cf86691ca9c9e2d7f83653a189b..c3d4500aaebbb0b8f0c2d6abdb4f4179bfad3cf0 100644 (file)
@@ -475,6 +475,9 @@ impl Bolt12Invoice {
        ///
        /// Blinded paths provide recipient privacy by obfuscating its node id. Note, however, that this
        /// privacy is lost if a public node id is used for [`Bolt12Invoice::signing_pubkey`].
+       ///
+       /// This is not exported to bindings users as slices with non-reference types cannot be ABI
+       /// matched in another language.
        pub fn payment_paths(&self) -> &[(BlindedPayInfo, BlindedPath)] {
                &self.contents.fields().payment_paths[..]
        }