Skip to content

Commit d8e2aa5

Browse files
committed
Remove (C-not exported) from docs
This PR fixes #2105. Before (C-not exported) lines were appearing in the docs but they are not for humans. This PR removes them.
1 parent 12d799e commit d8e2aa5

File tree

21 files changed

+148
-138
lines changed

21 files changed

+148
-138
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ where U::Target: UtxoLookup, L::Target: Logger {
164164
}
165165
}
166166

167-
/// (C-not exported) as the bindings concretize everything and have constructors for us
167+
// (C-not exported) as the bindings concretize everything and have constructors for us
168168
impl<P: Deref<Target = P2PGossipSync<G, U, L>>, G: Deref<Target = NetworkGraph<L>>, U: Deref, L: Deref>
169169
GossipSync<P, &RapidGossipSync<G, L>, G, U, L>
170170
where
@@ -177,7 +177,7 @@ where
177177
}
178178
}
179179

180-
/// (C-not exported) as the bindings concretize everything and have constructors for us
180+
// (C-not exported) as the bindings concretize everything and have constructors for us
181181
impl<'a, R: Deref<Target = RapidGossipSync<G, L>>, G: Deref<Target = NetworkGraph<L>>, L: Deref>
182182
GossipSync<
183183
&P2PGossipSync<G, &'a (dyn UtxoLookup + Send + Sync), L>,
@@ -195,7 +195,7 @@ where
195195
}
196196
}
197197

198-
/// (C-not exported) as the bindings concretize everything and have constructors for us
198+
// (C-not exported) as the bindings concretize everything and have constructors for us
199199
impl<'a, L: Deref>
200200
GossipSync<
201201
&P2PGossipSync<&'a NetworkGraph<L>, &'a (dyn UtxoLookup + Send + Sync), L>,

lightning-invoice/src/lib.rs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ pub const DEFAULT_MIN_FINAL_CLTV_EXPIRY_DELTA: u64 = 18;
215215
/// * `D`: exactly one `Description` or `DescriptionHash`
216216
/// * `H`: exactly one `PaymentHash`
217217
/// * `T`: the timestamp is set
218-
///
219-
/// (C-not exported) as we likely need to manually select one set of boolean type parameters.
218+
219+
// (C-not exported) as we likely need to manually select one set of boolean type parameters.
220220
#[derive(Eq, PartialEq, Debug, Clone)]
221221
pub struct InvoiceBuilder<D: tb::Bool, H: tb::Bool, T: tb::Bool, C: tb::Bool, S: tb::Bool> {
222222
currency: Currency,
@@ -246,9 +246,9 @@ pub struct Invoice {
246246

247247
/// Represents the description of an invoice which has to be either a directly included string or
248248
/// a hash of a description provided out of band.
249-
///
250-
/// (C-not exported) As we don't have a good way to map the reference lifetimes making this
251-
/// practically impossible to use safely in languages like C.
249+
250+
// (C-not exported) As we don't have a good way to map the reference lifetimes making this
251+
// practically impossible to use safely in languages like C.
252252
#[derive(Eq, PartialEq, Debug, Clone)]
253253
pub enum InvoiceDescription<'f> {
254254
/// Reference to the directly supplied description in the invoice
@@ -296,8 +296,8 @@ pub struct RawInvoice {
296296
}
297297

298298
/// Data of the `RawInvoice` that is encoded in the human readable part
299-
///
300-
/// (C-not exported) As we don't yet support `Option<Enum>`
299+
300+
// (C-not exported) As we don't yet support `Option<Enum>`
301301
#[derive(Eq, PartialEq, Debug, Clone, Hash)]
302302
pub struct RawHrp {
303303
/// The currency deferred from the 3rd and 4th character of the bech32 transaction
@@ -356,9 +356,9 @@ impl SiPrefix {
356356

357357
/// Returns all enum variants of `SiPrefix` sorted in descending order of their associated
358358
/// multiplier.
359-
///
360-
/// (C-not exported) As we don't yet support a slice of enums, and also because this function
361-
/// isn't the most critical to expose.
359+
360+
// (C-not exported) As we don't yet support a slice of enums, and also because this function
361+
// isn't the most critical to expose.
362362
pub fn values_desc() -> &'static [SiPrefix] {
363363
use crate::SiPrefix::*;
364364
static VALUES: [SiPrefix; 4] = [Milli, Micro, Nano, Pico];
@@ -386,8 +386,8 @@ pub enum Currency {
386386
}
387387

388388
/// Tagged field which may have an unknown tag
389-
///
390-
/// (C-not exported) as we don't currently support TaggedField
389+
390+
// (C-not exported) as we don't currently support TaggedField
391391
#[derive(Clone, Debug, Hash, Eq, PartialEq)]
392392
pub enum RawTaggedField {
393393
/// Parsed tagged field with known tag
@@ -399,9 +399,9 @@ pub enum RawTaggedField {
399399
/// Tagged field with known tag
400400
///
401401
/// For descriptions of the enum values please refer to the enclosed type's docs.
402-
///
403-
/// (C-not exported) As we don't yet support enum variants with the same name the struct contained
404-
/// in the variant.
402+
403+
// (C-not exported) As we don't yet support enum variants with the same name the struct contained
404+
// in the variant.
405405
#[allow(missing_docs)]
406406
#[derive(Clone, Debug, Hash, Eq, PartialEq)]
407407
pub enum TaggedField {
@@ -419,7 +419,7 @@ pub enum TaggedField {
419419

420420
/// SHA-256 hash
421421
#[derive(Clone, Debug, Hash, Eq, PartialEq)]
422-
pub struct Sha256(/// (C-not exported) as the native hash types are not currently mapped
422+
pub struct Sha256(// (C-not exported) as the native hash types are not currently mapped
423423
pub sha256::Hash);
424424

425425
/// Description string
@@ -872,9 +872,9 @@ impl RawInvoice {
872872
/// Signs the invoice using the supplied `sign_function`. This function MAY fail with an error
873873
/// of type `E`. Since the signature of a `SignedRawInvoice` is not required to be valid there
874874
/// are no constraints regarding the validity of the produced signature.
875-
///
876-
/// (C-not exported) As we don't currently support passing function pointers into methods
877-
/// explicitly.
875+
876+
// (C-not exported) As we don't currently support passing function pointers into methods
877+
// explicitly.
878878
pub fn sign<F, E>(self, sign_method: F) -> Result<SignedRawInvoice, E>
879879
where F: FnOnce(&Message) -> Result<RecoverableSignature, E>
880880
{
@@ -891,8 +891,8 @@ impl RawInvoice {
891891
}
892892

893893
/// Returns an iterator over all tagged fields with known semantics.
894-
///
895-
/// (C-not exported) As there is not yet a manual mapping for a FilterMap
894+
895+
// (C-not exported) As there is not yet a manual mapping for a FilterMap
896896
pub fn known_tagged_fields(&self)
897897
-> FilterMap<Iter<RawTaggedField>, fn(&RawTaggedField) -> Option<&TaggedField>>
898898
{
@@ -941,7 +941,7 @@ impl RawInvoice {
941941
find_extract!(self.known_tagged_fields(), TaggedField::Features(ref x), x)
942942
}
943943

944-
/// (C-not exported) as we don't support Vec<&NonOpaqueType>
944+
// (C-not exported) as we don't support Vec<&NonOpaqueType>
945945
pub fn fallbacks(&self) -> Vec<&Fallback> {
946946
find_all_extract!(self.known_tagged_fields(), TaggedField::Fallback(ref x), x).collect()
947947
}
@@ -1169,8 +1169,8 @@ impl Invoice {
11691169
}
11701170

11711171
/// Returns an iterator over all tagged fields of this Invoice.
1172-
///
1173-
/// (C-not exported) As there is not yet a manual mapping for a FilterMap
1172+
1173+
// (C-not exported) As there is not yet a manual mapping for a FilterMap
11741174
pub fn tagged_fields(&self)
11751175
-> FilterMap<Iter<RawTaggedField>, fn(&RawTaggedField) -> Option<&TaggedField>> {
11761176
self.signed_invoice.raw_invoice().known_tagged_fields()
@@ -1182,8 +1182,8 @@ impl Invoice {
11821182
}
11831183

11841184
/// Return the description or a hash of it for longer ones
1185-
///
1186-
/// (C-not exported) because we don't yet export InvoiceDescription
1185+
1186+
// (C-not exported) because we don't yet export InvoiceDescription
11871187
pub fn description(&self) -> InvoiceDescription {
11881188
if let Some(direct) = self.signed_invoice.description() {
11891189
return InvoiceDescription::Direct(direct);
@@ -1252,8 +1252,8 @@ impl Invoice {
12521252
}
12531253

12541254
/// Returns a list of all fallback addresses
1255-
///
1256-
/// (C-not exported) as we don't support Vec<&NonOpaqueType>
1255+
1256+
// (C-not exported) as we don't support Vec<&NonOpaqueType>
12571257
pub fn fallbacks(&self) -> Vec<&Fallback> {
12581258
self.signed_invoice.fallbacks()
12591259
}

lightning-invoice/src/ser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl Display for SignedRawInvoice {
124124
}
125125
}
126126

127-
/// (C-not exported)
127+
// (C-not exported)
128128
impl Display for RawHrp {
129129
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
130130
let amount = match self.raw_amount {

lightning-rapid-gossip-sync/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ impl<NG: Deref<Target=NetworkGraph<L>>, L: Deref> RapidGossipSync<NG, L> where L
145145

146146
/// Gets a reference to the underlying [`NetworkGraph`] which was provided in
147147
/// [`RapidGossipSync::new`].
148-
///
149-
/// (C-not exported) as bindings don't support a reference-to-a-reference yet
148+
149+
// (C-not exported) as bindings don't support a reference-to-a-reference yet
150150
pub fn network_graph(&self) -> &NG {
151151
&self.network_graph
152152
}

lightning/src/chain/keysinterface.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ use crate::util::invoice::construct_invoice_preimage;
5454

5555
/// Used as initial key material, to be expanded into multiple secret keys (but not to be used
5656
/// directly). This is used within LDK to encrypt/decrypt inbound payment data.
57-
///
58-
/// (C-not exported) as we just use `[u8; 32]` directly
57+
58+
// (C-not exported) as we just use `[u8; 32]` directly
5959
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
6060
pub struct KeyMaterial(pub [u8; 32]);
6161

lightning/src/chain/transaction.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ impl OutPoint {
6666
}
6767

6868
/// Converts this OutPoint into the OutPoint field as used by rust-bitcoin
69-
/// (C-not exported) as the same type is used universally in the C bindings for all outpoints
69+
70+
// (C-not exported) as the same type is used universally in the C bindings for all outpoints
7071
pub fn into_bitcoin_outpoint(self) -> BitcoinOutPoint {
7172
BitcoinOutPoint {
7273
txid: self.txid,

lightning/src/ln/chan_utils.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,8 +1271,8 @@ impl CommitmentTransaction {
12711271
/// This auxiliary data is not stored in this object.
12721272
///
12731273
/// Only include HTLCs that are above the dust limit for the channel.
1274-
///
1275-
/// (C-not exported) due to the generic though we likely should expose a version without
1274+
1275+
// (C-not exported) due to the generic though we likely should expose a version without
12761276
pub fn new_with_auxiliary_htlc_data<T>(commitment_number: u64, to_broadcaster_value_sat: u64, to_countersignatory_value_sat: u64, opt_anchors: bool, broadcaster_funding_key: PublicKey, countersignatory_funding_key: PublicKey, keys: TxCreationKeys, feerate_per_kw: u32, htlcs_with_aux: &mut Vec<(HTLCOutputInCommitment, T)>, channel_parameters: &DirectedChannelTransactionParameters) -> CommitmentTransaction {
12771277
// Sort outputs and populate output indices while keeping track of the auxiliary data
12781278
let (outputs, htlcs) = Self::internal_build_outputs(&keys, to_broadcaster_value_sat, to_countersignatory_value_sat, htlcs_with_aux, channel_parameters, opt_anchors, &broadcaster_funding_key, &countersignatory_funding_key).unwrap();
@@ -1297,8 +1297,8 @@ impl CommitmentTransaction {
12971297
}
12981298

12991299
/// Use non-zero fee anchors
1300-
///
1301-
/// (C-not exported) due to move, and also not likely to be useful for binding users
1300+
1301+
// (C-not exported) due to move, and also not likely to be useful for binding users
13021302
pub fn with_non_zero_fee_anchors(mut self) -> Self {
13031303
self.opt_non_zero_fee_anchors = Some(());
13041304
self
@@ -1478,9 +1478,9 @@ impl CommitmentTransaction {
14781478
/// The non-dust HTLCs (direction, amt, height expiration, hash, transaction output index)
14791479
/// which were included in this commitment transaction in output order.
14801480
/// The transaction index is always populated.
1481-
///
1482-
/// (C-not exported) as we cannot currently convert Vec references to/from C, though we should
1483-
/// expose a less effecient version which creates a Vec of references in the future.
1481+
1482+
// (C-not exported) as we cannot currently convert Vec references to/from C, though we should
1483+
// expose a less effecient version which creates a Vec of references in the future.
14841484
pub fn htlcs(&self) -> &Vec<HTLCOutputInCommitment> {
14851485
&self.htlcs
14861486
}

lightning/src/ln/channelmanager.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ struct ClaimableHTLC {
198198
}
199199

200200
/// A payment identifier used to uniquely identify a payment to LDK.
201-
/// (C-not exported) as we just use [u8; 32] directly
201+
202+
// (C-not exported) as we just use [u8; 32] directly
202203
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
203204
pub struct PaymentId(pub [u8; 32]);
204205

@@ -216,7 +217,8 @@ impl Readable for PaymentId {
216217
}
217218

218219
/// An identifier used to uniquely identify an intercepted HTLC to LDK.
219-
/// (C-not exported) as we just use [u8; 32] directly
220+
221+
// (C-not exported) as we just use [u8; 32] directly
220222
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
221223
pub struct InterceptId(pub [u8; 32]);
222224

@@ -566,8 +568,8 @@ struct PendingInboundPayment {
566568
/// issues such as overly long function definitions. Note that the ChannelManager can take any type
567569
/// that implements KeysInterface or Router for its keys manager and router, respectively, but this
568570
/// type alias chooses the concrete types of KeysManager and DefaultRouter.
569-
///
570-
/// (C-not exported) as Arcs don't make sense in bindings
571+
572+
// (C-not exported) as Arcs don't make sense in bindings
571573
pub type SimpleArcChannelManager<M, T, F, L> = ChannelManager<
572574
Arc<M>,
573575
Arc<T>,
@@ -591,8 +593,8 @@ pub type SimpleArcChannelManager<M, T, F, L> = ChannelManager<
591593
/// issues such as overly long function definitions. Note that the ChannelManager can take any type
592594
/// that implements KeysInterface or Router for its keys manager and router, respectively, but this
593595
/// type alias chooses the concrete types of KeysManager and DefaultRouter.
594-
///
595-
/// (C-not exported) as Arcs don't make sense in bindings
596+
597+
// (C-not exported) as Arcs don't make sense in bindings
596598
pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, M, T, F, L> = ChannelManager<&'a M, &'b T, &'c KeysManager, &'c KeysManager, &'c KeysManager, &'d F, &'e DefaultRouter<&'f NetworkGraph<&'g L>, &'g L, &'h Mutex<ProbabilisticScorer<&'f NetworkGraph<&'g L>, &'g L>>>, &'g L>;
597599

598600
/// Manager which keeps track of a number of channels and sends messages to the appropriate
@@ -7208,8 +7210,8 @@ where
72087210
///
72097211
/// In such cases the latest local transactions will be sent to the tx_broadcaster included in
72107212
/// this struct.
7211-
///
7212-
/// (C-not exported) because we have no HashMap bindings
7213+
7214+
// (C-not exported) because we have no HashMap bindings
72137215
pub channel_monitors: HashMap<OutPoint, &'a mut ChannelMonitor<<SP::Target as SignerProvider>::Signer>>,
72147216
}
72157217

lightning/src/ln/features.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ mod sealed {
392392

393393
/// Tracks the set of features which a node implements, templated by the context in which it
394394
/// appears.
395-
///
396-
/// (C-not exported) as we map the concrete feature types below directly instead
395+
396+
// (C-not exported) as we map the concrete feature types below directly instead
397397
#[derive(Eq)]
398398
pub struct Features<T: sealed::Context> {
399399
/// Note that, for convenience, flags is LITTLE endian (despite being big-endian on the wire)
@@ -622,7 +622,8 @@ impl<T: sealed::Context> Features<T> {
622622

623623
/// Create a Features given a set of flags, in little-endian. This is in reverse byte order from
624624
/// most on-the-wire encodings.
625-
/// (C-not exported) as we don't support export across multiple T
625+
626+
// (C-not exported) as we don't support export across multiple T
626627
pub fn from_le_bytes(flags: Vec<u8>) -> Features<T> {
627628
Features {
628629
flags,

lightning/src/ln/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,18 @@ mod shutdown_tests;
8282
pub use self::peer_channel_encryptor::LN_MAX_MSG_LEN;
8383

8484
/// payment_hash type, use to cross-lock hop
85-
/// (C-not exported) as we just use [u8; 32] directly
85+
86+
// (C-not exported) as we just use [u8; 32] directly
8687
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
8788
pub struct PaymentHash(pub [u8; 32]);
8889
/// payment_preimage type, use to route payment between hop
89-
/// (C-not exported) as we just use [u8; 32] directly
90+
91+
// (C-not exported) as we just use [u8; 32] directly
9092
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
9193
pub struct PaymentPreimage(pub [u8; 32]);
9294
/// payment_secret type, use to authenticate sender to the receiver and tie MPP HTLCs together
93-
/// (C-not exported) as we just use [u8; 32] directly
95+
96+
// (C-not exported) as we just use [u8; 32] directly
9497
#[derive(Hash, Copy, Clone, PartialEq, Eq, Debug)]
9598
pub struct PaymentSecret(pub [u8; 32]);
9699

lightning/src/ln/msgs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,8 @@ pub struct CommitmentUpdate {
938938
/// As we wish to serialize these differently from `Option<T>`s (`Options` get a tag byte, but
939939
/// [`OptionalField`] simply gets `Present` if there are enough bytes to read into it), we have a
940940
/// separate enum type for them.
941-
///
942-
/// (C-not exported) due to a free generic in `T`
941+
942+
// (C-not exported) due to a free generic in `T`
943943
#[derive(Clone, Debug, PartialEq, Eq)]
944944
pub enum OptionalField<T> {
945945
/// Optional field is included in message

0 commit comments

Comments
 (0)