@@ -1039,6 +1039,7 @@ pub struct BackgroundProcessorConfigAsync<
1039
1039
sleeper : Sleeper ,
1040
1040
mobile_interruptable_platform : bool ,
1041
1041
fetch_time : FetchTime ,
1042
+ /// Phantom data to ensure proper lifetime and type parameter constraints.
1042
1043
_phantom : PhantomData < & ' a ( ) > ,
1043
1044
}
1044
1045
@@ -1110,6 +1111,7 @@ pub struct BackgroundProcessorConfigAsyncBuilder<
1110
1111
sleeper : Sleeper ,
1111
1112
mobile_interruptable_platform : bool ,
1112
1113
fetch_time : FetchTime ,
1114
+ /// Phantom data to ensure proper lifetime and type parameter constraints.
1113
1115
_phantom : PhantomData < & ' a ( ) > ,
1114
1116
}
1115
1117
@@ -1309,43 +1311,6 @@ impl BackgroundProcessor {
1309
1311
/// background processing. To build this configuration, you can use the [`BackgroundProcessorConfigBuilder`]
1310
1312
/// which provides a convenient builder pattern for setting up both required and optional components.
1311
1313
///
1312
- /// # Data Persistence
1313
- ///
1314
- /// [`Persister::persist_manager`] is responsible for writing out the [`ChannelManager`] to disk, and/or
1315
- /// uploading to one or more backup services. See [`ChannelManager::write`] for writing out a
1316
- /// [`ChannelManager`]. See the `lightning-persister` crate for LDK's
1317
- /// provided implementation.
1318
- ///
1319
- /// [`Persister::persist_graph`] is responsible for writing out the [`NetworkGraph`] to disk, if
1320
- /// [`GossipSync`] is supplied. See [`NetworkGraph::write`] for writing out a [`NetworkGraph`].
1321
- /// See the `lightning-persister` crate for LDK's provided implementation.
1322
- ///
1323
- /// Typically, users should either implement [`Persister::persist_manager`] to never return an
1324
- /// error or call [`join`] and handle any error that may arise. For the latter case,
1325
- /// `BackgroundProcessor` must be restarted by calling `start` again after handling the error.
1326
- ///
1327
- /// # Event Handling
1328
- ///
1329
- /// The `event_handler` in the configuration is responsible for handling events that users should be notified of (e.g.,
1330
- /// payment failed). [`BackgroundProcessor`] may decorate the given [`EventHandler`] with common
1331
- /// functionality implemented by other handlers.
1332
- /// * [`P2PGossipSync`] if given will update the [`NetworkGraph`] based on payment failures.
1333
- ///
1334
- /// # Rapid Gossip Sync
1335
- ///
1336
- /// If rapid gossip sync is meant to run at startup, pass [`RapidGossipSync`] via `gossip_sync`
1337
- /// to indicate that the [`BackgroundProcessor`] should not prune the [`NetworkGraph`] instance
1338
- /// until the [`RapidGossipSync`] instance completes its first sync.
1339
- ///
1340
- /// [top-level documentation]: BackgroundProcessor
1341
- /// [`join`]: Self::join
1342
- /// [`stop`]: Self::stop
1343
- /// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
1344
- /// [`ChannelManager::write`]: lightning::ln::channelmanager::ChannelManager#impl-Writeable
1345
- /// [`Persister::persist_manager`]: lightning::util::persist::Persister::persist_manager
1346
- /// [`Persister::persist_graph`]: lightning::util::persist::Persister::persist_graph
1347
- /// [`NetworkGraph`]: lightning::routing::gossip::NetworkGraph
1348
- /// [`NetworkGraph::write`]: lightning::routing::gossip::NetworkGraph#impl-Writeable
1349
1314
pub fn start <
1350
1315
' a ,
1351
1316
UL : ' static + Deref ,
@@ -1566,6 +1531,44 @@ impl BackgroundProcessor {
1566
1531
///
1567
1532
/// The configuration can be constructed using [`BackgroundProcessorConfigBuilder`], which provides
1568
1533
/// a convenient builder pattern for setting up both required and optional components.
1534
+ ///
1535
+ /// # Data Persistence
1536
+ ///
1537
+ /// [`Persister::persist_manager`] is responsible for writing out the [`ChannelManager`] to disk, and/or
1538
+ /// uploading to one or more backup services. See [`ChannelManager::write`] for writing out a
1539
+ /// [`ChannelManager`]. See the `lightning-persister` crate for LDK's
1540
+ /// provided implementation.
1541
+ ///
1542
+ /// [`Persister::persist_graph`] is responsible for writing out the [`NetworkGraph`] to disk, if
1543
+ /// [`GossipSync`] is supplied. See [`NetworkGraph::write`] for writing out a [`NetworkGraph`].
1544
+ /// See the `lightning-persister` crate for LDK's provided implementation.
1545
+ ///
1546
+ /// Typically, users should either implement [`Persister::persist_manager`] to never return an
1547
+ /// error or call [`join`] and handle any error that may arise. For the latter case,
1548
+ /// `BackgroundProcessor` must be restarted by calling `start` again after handling the error.
1549
+ ///
1550
+ /// # Event Handling
1551
+ ///
1552
+ /// The `event_handler` in the configuration is responsible for handling events that users should be notified of (e.g.,
1553
+ /// payment failed). [`BackgroundProcessor`] may decorate the given [`EventHandler`] with common
1554
+ /// functionality implemented by other handlers.
1555
+ /// * [`P2PGossipSync`] if given will update the [`NetworkGraph`] based on payment failures.
1556
+ ///
1557
+ /// # Rapid Gossip Sync
1558
+ ///
1559
+ /// If rapid gossip sync is meant to run at startup, pass [`RapidGossipSync`] via `gossip_sync`
1560
+ /// to indicate that the [`BackgroundProcessor`] should not prune the [`NetworkGraph`] instance
1561
+ /// until the [`RapidGossipSync`] instance completes its first sync.
1562
+ ///
1563
+ /// [top-level documentation]: BackgroundProcessor
1564
+ /// [`join`]: Self::join
1565
+ /// [`stop`]: Self::stop
1566
+ /// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
1567
+ /// [`ChannelManager::write`]: lightning::ln::channelmanager::ChannelManager#impl-Writeable
1568
+ /// [`Persister::persist_manager`]: lightning::util::persist::Persister::persist_manager
1569
+ /// [`Persister::persist_graph`]: lightning::util::persist::Persister::persist_graph
1570
+ /// [`NetworkGraph`]: lightning::routing::gossip::NetworkGraph
1571
+ /// [`NetworkGraph::write`]: lightning::routing::gossip::NetworkGraph#impl-Writeable
1569
1572
#[ cfg( feature = "std" ) ]
1570
1573
pub struct BackgroundProcessorConfig <
1571
1574
' a ,
@@ -1623,6 +1626,7 @@ pub struct BackgroundProcessorConfig<
1623
1626
sweeper : Option < OS > ,
1624
1627
logger : L ,
1625
1628
scorer : Option < S > ,
1629
+ /// Phantom data to ensure proper lifetime and type parameter constraints.
1626
1630
_phantom : PhantomData < ( & ' a ( ) , CF , T , F , P ) > ,
1627
1631
}
1628
1632
@@ -1688,6 +1692,7 @@ pub struct BackgroundProcessorConfigBuilder<
1688
1692
sweeper : Option < OS > ,
1689
1693
logger : L ,
1690
1694
scorer : Option < S > ,
1695
+ /// Phantom data to ensure proper lifetime and type parameter constraints.
1691
1696
_phantom : PhantomData < ( & ' a ( ) , CF , T , F , P ) > ,
1692
1697
}
1693
1698
0 commit comments