+ LightningError(const LightningError&) = delete;
+ LightningError(LightningError&& o) : self(o.self) { memset(&o, 0, sizeof(LightningError)); }
+ LightningError(LDKLightningError&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKLightningError)); }
+ operator LDKLightningError() && { LDKLightningError res = self; memset(&self, 0, sizeof(LDKLightningError)); return res; }
+ ~LightningError() { LightningError_free(self); }
+ LightningError& operator=(LightningError&& o) { LightningError_free(self); self = o.self; memset(&o, 0, sizeof(LightningError)); return *this; }
+ LDKLightningError* operator &() { return &self; }
+ LDKLightningError* operator ->() { return &self; }
+ const LDKLightningError* operator &() const { return &self; }
+ const LDKLightningError* operator ->() const { return &self; }
+};
+class CommitmentUpdate {
+private:
+ LDKCommitmentUpdate self;
+public:
+ CommitmentUpdate(const CommitmentUpdate&) = delete;
+ CommitmentUpdate(CommitmentUpdate&& o) : self(o.self) { memset(&o, 0, sizeof(CommitmentUpdate)); }
+ CommitmentUpdate(LDKCommitmentUpdate&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCommitmentUpdate)); }
+ operator LDKCommitmentUpdate() && { LDKCommitmentUpdate res = self; memset(&self, 0, sizeof(LDKCommitmentUpdate)); return res; }
+ ~CommitmentUpdate() { CommitmentUpdate_free(self); }
+ CommitmentUpdate& operator=(CommitmentUpdate&& o) { CommitmentUpdate_free(self); self = o.self; memset(&o, 0, sizeof(CommitmentUpdate)); return *this; }
+ LDKCommitmentUpdate* operator &() { return &self; }
+ LDKCommitmentUpdate* operator ->() { return &self; }
+ const LDKCommitmentUpdate* operator &() const { return &self; }
+ const LDKCommitmentUpdate* operator ->() const { return &self; }
+};
+class ChannelMessageHandler {
+private:
+ LDKChannelMessageHandler self;
+public:
+ ChannelMessageHandler(const ChannelMessageHandler&) = delete;
+ ChannelMessageHandler(ChannelMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(ChannelMessageHandler)); }
+ ChannelMessageHandler(LDKChannelMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKChannelMessageHandler)); }
+ operator LDKChannelMessageHandler() && { LDKChannelMessageHandler res = self; memset(&self, 0, sizeof(LDKChannelMessageHandler)); return res; }
+ ~ChannelMessageHandler() { ChannelMessageHandler_free(self); }
+ ChannelMessageHandler& operator=(ChannelMessageHandler&& o) { ChannelMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(ChannelMessageHandler)); return *this; }
+ LDKChannelMessageHandler* operator &() { return &self; }
+ LDKChannelMessageHandler* operator ->() { return &self; }
+ const LDKChannelMessageHandler* operator &() const { return &self; }
+ const LDKChannelMessageHandler* operator ->() const { return &self; }
+ /**
+ * Handle an incoming `open_channel` message from the given peer.
+ */
+ inline void handle_open_channel(struct LDKPublicKey their_node_id, const struct LDKOpenChannel *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `open_channel2` message from the given peer.
+ */
+ inline void handle_open_channel_v2(struct LDKPublicKey their_node_id, const struct LDKOpenChannelV2 *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `accept_channel` message from the given peer.
+ */
+ inline void handle_accept_channel(struct LDKPublicKey their_node_id, const struct LDKAcceptChannel *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `accept_channel2` message from the given peer.
+ */
+ inline void handle_accept_channel_v2(struct LDKPublicKey their_node_id, const struct LDKAcceptChannelV2 *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `funding_created` message from the given peer.
+ */
+ inline void handle_funding_created(struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `funding_signed` message from the given peer.
+ */
+ inline void handle_funding_signed(struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `channel_ready` message from the given peer.
+ */
+ inline void handle_channel_ready(struct LDKPublicKey their_node_id, const struct LDKChannelReady *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `shutdown` message from the given peer.
+ */
+ inline void handle_shutdown(struct LDKPublicKey their_node_id, const struct LDKShutdown *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `closing_signed` message from the given peer.
+ */
+ inline void handle_closing_signed(struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `stfu` message from the given peer.
+ */
+ inline void handle_stfu(struct LDKPublicKey their_node_id, const struct LDKStfu *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `splice` message from the given peer.
+ */
+ inline void handle_splice(struct LDKPublicKey their_node_id, const struct LDKSplice *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `splice_ack` message from the given peer.
+ */
+ inline void handle_splice_ack(struct LDKPublicKey their_node_id, const struct LDKSpliceAck *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `splice_locked` message from the given peer.
+ */
+ inline void handle_splice_locked(struct LDKPublicKey their_node_id, const struct LDKSpliceLocked *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_add_input message` from the given peer.
+ */
+ inline void handle_tx_add_input(struct LDKPublicKey their_node_id, const struct LDKTxAddInput *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_add_output` message from the given peer.
+ */
+ inline void handle_tx_add_output(struct LDKPublicKey their_node_id, const struct LDKTxAddOutput *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_remove_input` message from the given peer.
+ */
+ inline void handle_tx_remove_input(struct LDKPublicKey their_node_id, const struct LDKTxRemoveInput *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_remove_output` message from the given peer.
+ */
+ inline void handle_tx_remove_output(struct LDKPublicKey their_node_id, const struct LDKTxRemoveOutput *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_complete message` from the given peer.
+ */
+ inline void handle_tx_complete(struct LDKPublicKey their_node_id, const struct LDKTxComplete *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_signatures` message from the given peer.
+ */
+ inline void handle_tx_signatures(struct LDKPublicKey their_node_id, const struct LDKTxSignatures *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_init_rbf` message from the given peer.
+ */
+ inline void handle_tx_init_rbf(struct LDKPublicKey their_node_id, const struct LDKTxInitRbf *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_ack_rbf` message from the given peer.
+ */
+ inline void handle_tx_ack_rbf(struct LDKPublicKey their_node_id, const struct LDKTxAckRbf *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `tx_abort message` from the given peer.
+ */
+ inline void handle_tx_abort(struct LDKPublicKey their_node_id, const struct LDKTxAbort *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `update_add_htlc` message from the given peer.
+ */
+ inline void handle_update_add_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `update_fulfill_htlc` message from the given peer.
+ */
+ inline void handle_update_fulfill_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `update_fail_htlc` message from the given peer.
+ */
+ inline void handle_update_fail_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `update_fail_malformed_htlc` message from the given peer.
+ */
+ inline void handle_update_fail_malformed_htlc(struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `commitment_signed` message from the given peer.
+ */
+ inline void handle_commitment_signed(struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `revoke_and_ack` message from the given peer.
+ */
+ inline void handle_revoke_and_ack(struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `update_fee` message from the given peer.
+ */
+ inline void handle_update_fee(struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `announcement_signatures` message from the given peer.
+ */
+ inline void handle_announcement_signatures(struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg);
+ /**
+ * Indicates a connection to the peer failed/an existing connection was lost.
+ */
+ inline void peer_disconnected(struct LDKPublicKey their_node_id);
+ /**
+ * Handle a peer reconnecting, possibly generating `channel_reestablish` message(s).
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
+ */
+ inline LDK::CResult_NoneNoneZ peer_connected(struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg, bool inbound);
+ /**
+ * Handle an incoming `channel_reestablish` message from the given peer.
+ */
+ inline void handle_channel_reestablish(struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `channel_update` message from the given peer.
+ */
+ inline void handle_channel_update(struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `error` message from the given peer.
+ */
+ inline void handle_error(struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg);
+ /**
+ * Gets the node feature flags which this handler itself supports. All available handlers are
+ * queried similarly and their feature flags are OR'd together to form the [`NodeFeatures`]
+ * which are broadcasted in our [`NodeAnnouncement`] message.
+ */
+ inline LDK::NodeFeatures provided_node_features();
+ /**
+ * Gets the init feature flags which should be sent to the given peer. All available handlers
+ * are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
+ * which are sent in our [`Init`] message.
+ *
+ * Note that this method is called before [`Self::peer_connected`].
+ */
+ inline LDK::InitFeatures provided_init_features(struct LDKPublicKey their_node_id);
+ /**
+ * Gets the chain hashes for this `ChannelMessageHandler` indicating which chains it supports.
+ *
+ * If it's `None`, then no particular network chain hash compatibility will be enforced when
+ * connecting to peers.
+ */
+ inline LDK::COption_CVec_ThirtyTwoBytesZZ get_chain_hashes();
+};
+class RoutingMessageHandler {
+private:
+ LDKRoutingMessageHandler self;
+public:
+ RoutingMessageHandler(const RoutingMessageHandler&) = delete;
+ RoutingMessageHandler(RoutingMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(RoutingMessageHandler)); }
+ RoutingMessageHandler(LDKRoutingMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRoutingMessageHandler)); }
+ operator LDKRoutingMessageHandler() && { LDKRoutingMessageHandler res = self; memset(&self, 0, sizeof(LDKRoutingMessageHandler)); return res; }
+ ~RoutingMessageHandler() { RoutingMessageHandler_free(self); }
+ RoutingMessageHandler& operator=(RoutingMessageHandler&& o) { RoutingMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(RoutingMessageHandler)); return *this; }
+ LDKRoutingMessageHandler* operator &() { return &self; }
+ LDKRoutingMessageHandler* operator ->() { return &self; }
+ const LDKRoutingMessageHandler* operator &() const { return &self; }
+ const LDKRoutingMessageHandler* operator ->() const { return &self; }
+ /**
+ * Handle an incoming `node_announcement` message, returning `true` if it should be forwarded on,
+ * `false` or returning an `Err` otherwise.
+ */
+ inline LDK::CResult_boolLightningErrorZ handle_node_announcement(const struct LDKNodeAnnouncement *NONNULL_PTR msg);
+ /**
+ * Handle a `channel_announcement` message, returning `true` if it should be forwarded on, `false`
+ * or returning an `Err` otherwise.
+ */
+ inline LDK::CResult_boolLightningErrorZ handle_channel_announcement(const struct LDKChannelAnnouncement *NONNULL_PTR msg);
+ /**
+ * Handle an incoming `channel_update` message, returning true if it should be forwarded on,
+ * `false` or returning an `Err` otherwise.
+ */
+ inline LDK::CResult_boolLightningErrorZ handle_channel_update(const struct LDKChannelUpdate *NONNULL_PTR msg);
+ /**
+ * Gets channel announcements and updates required to dump our routing table to a remote node,
+ * starting at the `short_channel_id` indicated by `starting_point` and including announcements
+ * for a single channel.
+ */
+ inline LDK::COption_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcement(uint64_t starting_point);
+ /**
+ * Gets a node announcement required to dump our routing table to a remote node, starting at
+ * the node *after* the provided pubkey and including up to one announcement immediately
+ * higher (as defined by `<PublicKey as Ord>::cmp`) than `starting_point`.
+ * If `None` is provided for `starting_point`, we start at the first node.
+ *
+ * Note that starting_point (or a relevant inner pointer) may be NULL or all-0s to represent None
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ inline LDK::NodeAnnouncement get_next_node_announcement(struct LDKNodeId starting_point);
+ /**
+ * Called when a connection is established with a peer. This can be used to
+ * perform routing table synchronization using a strategy defined by the
+ * implementor.
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
+ */
+ inline LDK::CResult_NoneNoneZ peer_connected(struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init, bool inbound);
+ /**
+ * Handles the reply of a query we initiated to learn about channels
+ * for a given range of blocks. We can expect to receive one or more
+ * replies to a single query.
+ */
+ inline LDK::CResult_NoneLightningErrorZ handle_reply_channel_range(struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg);
+ /**
+ * Handles the reply of a query we initiated asking for routing gossip
+ * messages for a list of channels. We should receive this message when
+ * a node has completed its best effort to send us the pertaining routing
+ * gossip messages.
+ */
+ inline LDK::CResult_NoneLightningErrorZ handle_reply_short_channel_ids_end(struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg);
+ /**
+ * Handles when a peer asks us to send a list of `short_channel_id`s
+ * for the requested range of blocks.
+ */
+ inline LDK::CResult_NoneLightningErrorZ handle_query_channel_range(struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg);
+ /**
+ * Handles when a peer asks us to send routing gossip messages for a
+ * list of `short_channel_id`s.
+ */
+ inline LDK::CResult_NoneLightningErrorZ handle_query_short_channel_ids(struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg);
+ /**
+ * Indicates that there are a large number of [`ChannelAnnouncement`] (or other) messages
+ * pending some async action. While there is no guarantee of the rate of future messages, the
+ * caller should seek to reduce the rate of new gossip messages handled, especially
+ * [`ChannelAnnouncement`]s.
+ */
+ inline bool processing_queue_high();
+ /**
+ * Gets the node feature flags which this handler itself supports. All available handlers are
+ * queried similarly and their feature flags are OR'd together to form the [`NodeFeatures`]
+ * which are broadcasted in our [`NodeAnnouncement`] message.
+ */
+ inline LDK::NodeFeatures provided_node_features();
+ /**
+ * Gets the init feature flags which should be sent to the given peer. All available handlers
+ * are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
+ * which are sent in our [`Init`] message.
+ *
+ * Note that this method is called before [`Self::peer_connected`].
+ */
+ inline LDK::InitFeatures provided_init_features(struct LDKPublicKey their_node_id);
+};
+class OnionMessageHandler {
+private:
+ LDKOnionMessageHandler self;
+public:
+ OnionMessageHandler(const OnionMessageHandler&) = delete;
+ OnionMessageHandler(OnionMessageHandler&& o) : self(o.self) { memset(&o, 0, sizeof(OnionMessageHandler)); }
+ OnionMessageHandler(LDKOnionMessageHandler&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKOnionMessageHandler)); }
+ operator LDKOnionMessageHandler() && { LDKOnionMessageHandler res = self; memset(&self, 0, sizeof(LDKOnionMessageHandler)); return res; }
+ ~OnionMessageHandler() { OnionMessageHandler_free(self); }
+ OnionMessageHandler& operator=(OnionMessageHandler&& o) { OnionMessageHandler_free(self); self = o.self; memset(&o, 0, sizeof(OnionMessageHandler)); return *this; }
+ LDKOnionMessageHandler* operator &() { return &self; }
+ LDKOnionMessageHandler* operator ->() { return &self; }
+ const LDKOnionMessageHandler* operator &() const { return &self; }
+ const LDKOnionMessageHandler* operator ->() const { return &self; }
+ /**
+ * Because much of the lightning network does not yet support forwarding onion messages, we
+ * may need to directly connect to a node which will forward a message for us. In such a case,
+ * this method will return the set of nodes which need connection by node_id and the
+ * corresponding socket addresses where they may accept incoming connections.
+ *
+ * Thus, this method should be polled regularly to detect messages await such a direct
+ * connection.
+ */
+ inline LDK::CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ get_and_clear_connections_needed();
+ /**
+ * Handle an incoming `onion_message` message from the given peer.
+ */
+ inline void handle_onion_message(struct LDKPublicKey peer_node_id, const struct LDKOnionMessage *NONNULL_PTR msg);
+ /**
+ * Returns the next pending onion message for the peer with the given node id.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ inline LDK::OnionMessage next_onion_message_for_peer(struct LDKPublicKey peer_node_id);
+ /**
+ * Called when a connection is established with a peer. Can be used to track which peers
+ * advertise onion message support and are online.
+ *
+ * May return an `Err(())` if the features the peer supports are not sufficient to communicate
+ * with us. Implementors should be somewhat conservative about doing so, however, as other
+ * message handlers may still wish to communicate with this peer.
+ */
+ inline LDK::CResult_NoneNoneZ peer_connected(struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init, bool inbound);
+ /**
+ * Indicates a connection to the peer failed/an existing connection was lost. Allows handlers to
+ * drop and refuse to forward onion messages to this peer.
+ */
+ inline void peer_disconnected(struct LDKPublicKey their_node_id);
+ /**
+ * Performs actions that should happen roughly every ten seconds after startup. Allows handlers
+ * to drop any buffered onion messages intended for prospective peers.
+ */
+ inline void timer_tick_occurred();
+ /**
+ * Gets the node feature flags which this handler itself supports. All available handlers are
+ * queried similarly and their feature flags are OR'd together to form the [`NodeFeatures`]
+ * which are broadcasted in our [`NodeAnnouncement`] message.
+ */
+ inline LDK::NodeFeatures provided_node_features();
+ /**
+ * Gets the init feature flags which should be sent to the given peer. All available handlers
+ * are queried similarly and their feature flags are OR'd together to form the [`InitFeatures`]
+ * which are sent in our [`Init`] message.
+ *
+ * Note that this method is called before [`Self::peer_connected`].
+ */
+ inline LDK::InitFeatures provided_init_features(struct LDKPublicKey their_node_id);
+};
+class FinalOnionHopData {
+private:
+ LDKFinalOnionHopData self;
+public:
+ FinalOnionHopData(const FinalOnionHopData&) = delete;
+ FinalOnionHopData(FinalOnionHopData&& o) : self(o.self) { memset(&o, 0, sizeof(FinalOnionHopData)); }
+ FinalOnionHopData(LDKFinalOnionHopData&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKFinalOnionHopData)); }
+ operator LDKFinalOnionHopData() && { LDKFinalOnionHopData res = self; memset(&self, 0, sizeof(LDKFinalOnionHopData)); return res; }
+ ~FinalOnionHopData() { FinalOnionHopData_free(self); }
+ FinalOnionHopData& operator=(FinalOnionHopData&& o) { FinalOnionHopData_free(self); self = o.self; memset(&o, 0, sizeof(FinalOnionHopData)); return *this; }
+ LDKFinalOnionHopData* operator &() { return &self; }
+ LDKFinalOnionHopData* operator ->() { return &self; }
+ const LDKFinalOnionHopData* operator &() const { return &self; }
+ const LDKFinalOnionHopData* operator ->() const { return &self; }
+};
+class OnionPacket {
+private:
+ LDKOnionPacket self;
+public:
+ OnionPacket(const OnionPacket&) = delete;
+ OnionPacket(OnionPacket&& o) : self(o.self) { memset(&o, 0, sizeof(OnionPacket)); }
+ OnionPacket(LDKOnionPacket&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKOnionPacket)); }
+ operator LDKOnionPacket() && { LDKOnionPacket res = self; memset(&self, 0, sizeof(LDKOnionPacket)); return res; }
+ ~OnionPacket() { OnionPacket_free(self); }
+ OnionPacket& operator=(OnionPacket&& o) { OnionPacket_free(self); self = o.self; memset(&o, 0, sizeof(OnionPacket)); return *this; }
+ LDKOnionPacket* operator &() { return &self; }
+ LDKOnionPacket* operator ->() { return &self; }
+ const LDKOnionPacket* operator &() const { return &self; }
+ const LDKOnionPacket* operator ->() const { return &self; }
+};
+class Level {
+private:
+ LDKLevel self;
+public:
+ Level(const Level&) = delete;
+ Level(Level&& o) : self(o.self) { memset(&o, 0, sizeof(Level)); }
+ Level(LDKLevel&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKLevel)); }
+ operator LDKLevel() && { LDKLevel res = self; memset(&self, 0, sizeof(LDKLevel)); return res; }
+ Level& operator=(Level&& o) { self = o.self; memset(&o, 0, sizeof(Level)); return *this; }
+ LDKLevel* operator &() { return &self; }
+ LDKLevel* operator ->() { return &self; }
+ const LDKLevel* operator &() const { return &self; }
+ const LDKLevel* operator ->() const { return &self; }
+};
+class Record {
+private:
+ LDKRecord self;
+public:
+ Record(const Record&) = delete;
+ Record(Record&& o) : self(o.self) { memset(&o, 0, sizeof(Record)); }
+ Record(LDKRecord&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKRecord)); }
+ operator LDKRecord() && { LDKRecord res = self; memset(&self, 0, sizeof(LDKRecord)); return res; }
+ ~Record() { Record_free(self); }
+ Record& operator=(Record&& o) { Record_free(self); self = o.self; memset(&o, 0, sizeof(Record)); return *this; }
+ LDKRecord* operator &() { return &self; }
+ LDKRecord* operator ->() { return &self; }
+ const LDKRecord* operator &() const { return &self; }
+ const LDKRecord* operator ->() const { return &self; }
+};
+class Logger {
+private:
+ LDKLogger self;
+public:
+ Logger(const Logger&) = delete;
+ Logger(Logger&& o) : self(o.self) { memset(&o, 0, sizeof(Logger)); }
+ Logger(LDKLogger&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKLogger)); }
+ operator LDKLogger() && { LDKLogger res = self; memset(&self, 0, sizeof(LDKLogger)); return res; }
+ ~Logger() { Logger_free(self); }
+ Logger& operator=(Logger&& o) { Logger_free(self); self = o.self; memset(&o, 0, sizeof(Logger)); return *this; }
+ LDKLogger* operator &() { return &self; }
+ LDKLogger* operator ->() { return &self; }
+ const LDKLogger* operator &() const { return &self; }
+ const LDKLogger* operator ->() const { return &self; }
+ /**
+ * Logs the [`Record`].
+ */
+ inline void log(struct LDKRecord record);
+};
+class FutureCallback {
+private:
+ LDKFutureCallback self;
+public:
+ FutureCallback(const FutureCallback&) = delete;
+ FutureCallback(FutureCallback&& o) : self(o.self) { memset(&o, 0, sizeof(FutureCallback)); }
+ FutureCallback(LDKFutureCallback&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKFutureCallback)); }
+ operator LDKFutureCallback() && { LDKFutureCallback res = self; memset(&self, 0, sizeof(LDKFutureCallback)); return res; }
+ ~FutureCallback() { FutureCallback_free(self); }
+ FutureCallback& operator=(FutureCallback&& o) { FutureCallback_free(self); self = o.self; memset(&o, 0, sizeof(FutureCallback)); return *this; }
+ LDKFutureCallback* operator &() { return &self; }
+ LDKFutureCallback* operator ->() { return &self; }
+ const LDKFutureCallback* operator &() const { return &self; }
+ const LDKFutureCallback* operator ->() const { return &self; }
+ /**
+ * The method which is called.
+ */
+ inline void call();