]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Mark new `types` `#[doc(hidden)]` methods as bindings no-export
authorMatt Corallo <git@bluematt.me>
Mon, 26 Aug 2024 18:28:07 +0000 (18:28 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 26 Aug 2024 18:30:08 +0000 (18:30 +0000)
lightning-types/src/features.rs

index 54587dc980a5cc004908e059881d5eafe2dc2a8b..a3cb9db2f161a526b7d3b1fa83b0a206c440dd67 100644 (file)
@@ -703,6 +703,8 @@ impl InitFeatures {
        #[doc(hidden)]
        /// Converts `InitFeatures` to `Features<C>`. Only known `InitFeatures` relevant to context `C`
        /// are included in the result.
+       ///
+       /// This is not exported to bindings users as it shouldn't be used outside of LDK
        pub fn to_context<C: sealed::Context>(&self) -> Features<C> {
                self.to_context_internal()
        }
@@ -712,6 +714,8 @@ impl Bolt11InvoiceFeatures {
        #[doc(hidden)]
        /// Converts `Bolt11InvoiceFeatures` to `Features<C>`. Only known `Bolt11InvoiceFeatures` relevant to
        /// context `C` are included in the result.
+       ///
+       /// This is not exported to bindings users as it shouldn't be used outside of LDK
        pub fn to_context<C: sealed::Context>(&self) -> Features<C> {
                self.to_context_internal()
        }
@@ -737,6 +741,8 @@ impl Bolt12InvoiceFeatures {
        #[doc(hidden)]
        /// Converts [`Bolt12InvoiceFeatures`] to [`Features<C>`]. Only known [`Bolt12InvoiceFeatures`]
        /// relevant to context `C` are included in the result.
+       ///
+       /// This is not exported to bindings users as it shouldn't be used outside of LDK
        pub fn to_context<C: sealed::Context>(&self) -> Features<C> {
                self.to_context_internal()
        }
@@ -744,8 +750,10 @@ impl Bolt12InvoiceFeatures {
 
 impl ChannelTypeFeatures {
        #[doc(hidden)]
-       // Maps the relevant `InitFeatures` to `ChannelTypeFeatures`. Any unknown features to
-       // `ChannelTypeFeatures` are not included in the result.
+       /// Maps the relevant `InitFeatures` to `ChannelTypeFeatures`. Any unknown features to
+       /// `ChannelTypeFeatures` are not included in the result.
+       ///
+       /// This is not exported to bindings users as it shouldn't be used outside of LDK
        pub fn from_init(init: &InitFeatures) -> Self {
                let mut ret = init.to_context_internal();
                // ChannelTypeFeatures must only contain required bits, so we OR the required forms of all