Skip to content

Commit 9effe0a

Browse files
authored
Merge pull request #3272 from TheBlueMatt/2024-08-bindings-hidden
Mark new `types` `#[doc(hidden)]` methods as bindings no-export
2 parents ff0874a + b6b259c commit 9effe0a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

lightning-types/src/features.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ impl InitFeatures {
703703
#[doc(hidden)]
704704
/// Converts `InitFeatures` to `Features<C>`. Only known `InitFeatures` relevant to context `C`
705705
/// are included in the result.
706+
///
707+
/// This is not exported to bindings users as it shouldn't be used outside of LDK
706708
pub fn to_context<C: sealed::Context>(&self) -> Features<C> {
707709
self.to_context_internal()
708710
}
@@ -712,6 +714,8 @@ impl Bolt11InvoiceFeatures {
712714
#[doc(hidden)]
713715
/// Converts `Bolt11InvoiceFeatures` to `Features<C>`. Only known `Bolt11InvoiceFeatures` relevant to
714716
/// context `C` are included in the result.
717+
///
718+
/// This is not exported to bindings users as it shouldn't be used outside of LDK
715719
pub fn to_context<C: sealed::Context>(&self) -> Features<C> {
716720
self.to_context_internal()
717721
}
@@ -737,15 +741,19 @@ impl Bolt12InvoiceFeatures {
737741
#[doc(hidden)]
738742
/// Converts [`Bolt12InvoiceFeatures`] to [`Features<C>`]. Only known [`Bolt12InvoiceFeatures`]
739743
/// relevant to context `C` are included in the result.
744+
///
745+
/// This is not exported to bindings users as it shouldn't be used outside of LDK
740746
pub fn to_context<C: sealed::Context>(&self) -> Features<C> {
741747
self.to_context_internal()
742748
}
743749
}
744750

745751
impl ChannelTypeFeatures {
746752
#[doc(hidden)]
747-
// Maps the relevant `InitFeatures` to `ChannelTypeFeatures`. Any unknown features to
748-
// `ChannelTypeFeatures` are not included in the result.
753+
/// Maps the relevant `InitFeatures` to `ChannelTypeFeatures`. Any unknown features to
754+
/// `ChannelTypeFeatures` are not included in the result.
755+
///
756+
/// This is not exported to bindings users as it shouldn't be used outside of LDK
749757
pub fn from_init(init: &InitFeatures) -> Self {
750758
let mut ret = init.to_context_internal();
751759
// ChannelTypeFeatures must only contain required bits, so we OR the required forms of all

lightning/src/io/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
pub use bitcoin::io::*;
22

33
/// Emulation of std::io::Cursor
4+
///
5+
/// This is not exported to bindings users as serialization is done via a bindings-specific
6+
/// pipeline.
47
#[derive(Clone, Debug, Default, Eq, PartialEq)]
58
pub struct Cursor<T> {
69
inner: T,

0 commit comments

Comments
 (0)