-pub struct ChannelManagerPersister {
- /// An opaque pointer which is passed to your function implementations as an argument.
- /// This has no meaning in the LDK, and can be NULL or any other value.
- pub this_arg: *mut c_void,
- /// Persist the given [`ChannelManager`] to disk, returning an error if persistence failed
- /// (which will cause the [`BackgroundProcessor`] which called this method to exit.
- ///
- /// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
- #[must_use]
- pub persist_manager: extern "C" fn (this_arg: *const c_void, channel_manager: &crate::lightning::ln::channelmanager::ChannelManager) -> crate::c_types::derived::CResult_NoneErrorZ,
- /// Frees any resources associated with this object given its this_arg pointer.
- /// Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed.
- pub free: Option<extern "C" fn(this_arg: *mut c_void)>,
-}
-unsafe impl Send for ChannelManagerPersister {}
-unsafe impl Sync for ChannelManagerPersister {}
-#[no_mangle]
-pub(crate) extern "C" fn ChannelManagerPersister_clone_fields(orig: &ChannelManagerPersister) -> ChannelManagerPersister {
- ChannelManagerPersister {
- this_arg: orig.this_arg,
- persist_manager: Clone::clone(&orig.persist_manager),
- free: Clone::clone(&orig.free),
- }
+pub enum GossipSync {
+ /// Gossip sync via the lightning peer-to-peer network as defined by BOLT 7.
+ P2P(
+ /// Note that this field is expected to be a reference.
+ crate::lightning::routing::gossip::P2PGossipSync),
+ /// Rapid gossip sync from a trusted server.
+ Rapid(
+ /// Note that this field is expected to be a reference.
+ crate::lightning_rapid_gossip_sync::RapidGossipSync),
+ /// No gossip sync.
+ None,