From: Matt Corallo Date: Fri, 1 Jan 2021 01:31:43 +0000 (-0500) Subject: - bindings diff X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=ff0561dc63d5bb72954d50d1c298a1776f52e31f;p=rust-lightning - bindings diff --- diff --git a/lightning-c-bindings/src/c_types/derived.rs b/lightning-c-bindings/src/c_types/derived.rs index 3cf2a7ed5..0e92f2088 100644 --- a/lightning-c-bindings/src/c_types/derived.rs +++ b/lightning-c-bindings/src/c_types/derived.rs @@ -1,19 +1,15 @@ -#[no_mangle] pub type CVec_SpendableOutputDescriptorZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_SpendableOutputDescriptorZ_free: extern "C" fn(CVec_SpendableOutputDescriptorZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_MessageSendEventZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_MessageSendEventZ_free: extern "C" fn(CVec_MessageSendEventZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_EventZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_EventZ_free: extern "C" fn(CVec_EventZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type C2Tuple_usizeTransactionZ = crate::c_types::C2TupleTempl; #[no_mangle] pub static C2Tuple_usizeTransactionZ_free: extern "C" fn(C2Tuple_usizeTransactionZ) = crate::c_types::C2TupleTempl_free::; @@ -22,12 +18,10 @@ pub extern "C" fn C2Tuple_usizeTransactionZ_new(a: usize, b: crate::c_types::Tra C2Tuple_usizeTransactionZ { a, b, } } -#[no_mangle] pub type CVec_C2Tuple_usizeTransactionZZ = crate::c_types::CVecTempl>; #[no_mangle] pub static CVec_C2Tuple_usizeTransactionZZ_free: extern "C" fn(CVec_C2Tuple_usizeTransactionZZ) = crate::c_types::CVecTempl_free::>; -#[no_mangle] pub type CResult_NoneChannelMonitorUpdateErrZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_NoneChannelMonitorUpdateErrZ_free: extern "C" fn(CResult_NoneChannelMonitorUpdateErrZ) = crate::c_types::CResultTempl_free::; @@ -40,12 +34,10 @@ pub extern "C" fn CResult_NoneChannelMonitorUpdateErrZ_ok() -> CResult_NoneChann pub static CResult_NoneChannelMonitorUpdateErrZ_err: extern "C" fn (crate::chain::channelmonitor::ChannelMonitorUpdateErr) -> CResult_NoneChannelMonitorUpdateErrZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CVec_MonitorEventZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_MonitorEventZ_free: extern "C" fn(CVec_MonitorEventZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CResult_NoneMonitorUpdateErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_NoneMonitorUpdateErrorZ_free: extern "C" fn(CResult_NoneMonitorUpdateErrorZ) = crate::c_types::CResultTempl_free::; @@ -58,7 +50,6 @@ pub extern "C" fn CResult_NoneMonitorUpdateErrorZ_ok() -> CResult_NoneMonitorUpd pub static CResult_NoneMonitorUpdateErrorZ_err: extern "C" fn (crate::chain::channelmonitor::MonitorUpdateError) -> CResult_NoneMonitorUpdateErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type C2Tuple_OutPointScriptZ = crate::c_types::C2TupleTempl; #[no_mangle] pub static C2Tuple_OutPointScriptZ_free: extern "C" fn(C2Tuple_OutPointScriptZ) = crate::c_types::C2TupleTempl_free::; @@ -67,12 +58,10 @@ pub extern "C" fn C2Tuple_OutPointScriptZ_new(a: crate::chain::transaction::OutP C2Tuple_OutPointScriptZ { a, b, } } -#[no_mangle] pub type CVec_TransactionZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_TransactionZ_free: extern "C" fn(CVec_TransactionZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type C2Tuple_u32TxOutZ = crate::c_types::C2TupleTempl; #[no_mangle] pub static C2Tuple_u32TxOutZ_free: extern "C" fn(C2Tuple_u32TxOutZ) = crate::c_types::C2TupleTempl_free::; @@ -81,12 +70,10 @@ pub extern "C" fn C2Tuple_u32TxOutZ_new(a: u32, b: crate::c_types::TxOut) -> C2T C2Tuple_u32TxOutZ { a, b, } } -#[no_mangle] pub type CVec_C2Tuple_u32TxOutZZ = crate::c_types::CVecTempl>; #[no_mangle] pub static CVec_C2Tuple_u32TxOutZZ_free: extern "C" fn(CVec_C2Tuple_u32TxOutZZ) = crate::c_types::CVecTempl_free::>; -#[no_mangle] pub type C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ = crate::c_types::C2TupleTempl>>; #[no_mangle] pub static C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free: extern "C" fn(C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ) = crate::c_types::C2TupleTempl_free::>>; @@ -95,12 +82,10 @@ pub extern "C" fn C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: crate::c_types::Th C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { a, b, } } -#[no_mangle] pub type CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ = crate::c_types::CVecTempl>>>; #[no_mangle] pub static CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free: extern "C" fn(CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ) = crate::c_types::CVecTempl_free::>>>; -#[no_mangle] pub type C2Tuple_u64u64Z = crate::c_types::C2TupleTempl; #[no_mangle] pub static C2Tuple_u64u64Z_free: extern "C" fn(C2Tuple_u64u64Z) = crate::c_types::C2TupleTempl_free::; @@ -109,12 +94,10 @@ pub extern "C" fn C2Tuple_u64u64Z_new(a: u64, b: u64) -> C2Tuple_u64u64Z { C2Tuple_u64u64Z { a, b, } } -#[no_mangle] pub type CVec_SignatureZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_SignatureZ_free: extern "C" fn(CVec_SignatureZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type C2Tuple_SignatureCVec_SignatureZZ = crate::c_types::C2TupleTempl>; #[no_mangle] pub static C2Tuple_SignatureCVec_SignatureZZ_free: extern "C" fn(C2Tuple_SignatureCVec_SignatureZZ) = crate::c_types::C2TupleTempl_free::>; @@ -123,7 +106,6 @@ pub extern "C" fn C2Tuple_SignatureCVec_SignatureZZ_new(a: crate::c_types::Signa C2Tuple_SignatureCVec_SignatureZZ { a, b, } } -#[no_mangle] pub type CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ = crate::c_types::CResultTempl>, u8>; #[no_mangle] pub static CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free: extern "C" fn(CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ) = crate::c_types::CResultTempl_free::>, u8>; @@ -136,7 +118,6 @@ pub extern "C" fn CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err() -> CResul crate::c_types::CResultTempl::err(0) } -#[no_mangle] pub type CResult_SignatureNoneZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_SignatureNoneZ_free: extern "C" fn(CResult_SignatureNoneZ) = crate::c_types::CResultTempl_free::; @@ -149,7 +130,6 @@ pub extern "C" fn CResult_SignatureNoneZ_err() -> CResult_SignatureNoneZ { crate::c_types::CResultTempl::err(0) } -#[no_mangle] pub type CResult_CVec_SignatureZNoneZ = crate::c_types::CResultTempl, u8>; #[no_mangle] pub static CResult_CVec_SignatureZNoneZ_free: extern "C" fn(CResult_CVec_SignatureZNoneZ) = crate::c_types::CResultTempl_free::, u8>; @@ -162,7 +142,6 @@ pub extern "C" fn CResult_CVec_SignatureZNoneZ_err() -> CResult_CVec_SignatureZN crate::c_types::CResultTempl::err(0) } -#[no_mangle] pub type CResult_ChanKeySignerDecodeErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_ChanKeySignerDecodeErrorZ_free: extern "C" fn(CResult_ChanKeySignerDecodeErrorZ) = crate::c_types::CResultTempl_free::; @@ -174,7 +153,6 @@ pub static CResult_ChanKeySignerDecodeErrorZ_ok: extern "C" fn (crate::chain::ke pub static CResult_ChanKeySignerDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ChanKeySignerDecodeErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CResult_TxOutAccessErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_TxOutAccessErrorZ_free: extern "C" fn(CResult_TxOutAccessErrorZ) = crate::c_types::CResultTempl_free::; @@ -186,7 +164,6 @@ pub static CResult_TxOutAccessErrorZ_ok: extern "C" fn (crate::c_types::TxOut) - pub static CResult_TxOutAccessErrorZ_err: extern "C" fn (crate::chain::AccessError) -> CResult_TxOutAccessErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CResult_NoneAPIErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_NoneAPIErrorZ_free: extern "C" fn(CResult_NoneAPIErrorZ) = crate::c_types::CResultTempl_free::; @@ -199,12 +176,10 @@ pub extern "C" fn CResult_NoneAPIErrorZ_ok() -> CResult_NoneAPIErrorZ { pub static CResult_NoneAPIErrorZ_err: extern "C" fn (crate::util::errors::APIError) -> CResult_NoneAPIErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CVec_ChannelDetailsZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_ChannelDetailsZ_free: extern "C" fn(CVec_ChannelDetailsZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CResult_NonePaymentSendFailureZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_NonePaymentSendFailureZ_free: extern "C" fn(CResult_NonePaymentSendFailureZ) = crate::c_types::CResultTempl_free::; @@ -217,42 +192,34 @@ pub extern "C" fn CResult_NonePaymentSendFailureZ_ok() -> CResult_NonePaymentSen pub static CResult_NonePaymentSendFailureZ_err: extern "C" fn (crate::ln::channelmanager::PaymentSendFailure) -> CResult_NonePaymentSendFailureZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CVec_NetAddressZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_NetAddressZ_free: extern "C" fn(CVec_NetAddressZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_ChannelMonitorZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_ChannelMonitorZ_free: extern "C" fn(CVec_ChannelMonitorZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_u64Z = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_u64Z_free: extern "C" fn(CVec_u64Z) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_UpdateAddHTLCZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_UpdateAddHTLCZ_free: extern "C" fn(CVec_UpdateAddHTLCZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_UpdateFulfillHTLCZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_UpdateFulfillHTLCZ_free: extern "C" fn(CVec_UpdateFulfillHTLCZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_UpdateFailHTLCZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_UpdateFailHTLCZ_free: extern "C" fn(CVec_UpdateFailHTLCZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_UpdateFailMalformedHTLCZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_UpdateFailMalformedHTLCZ_free: extern "C" fn(CVec_UpdateFailMalformedHTLCZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CResult_boolLightningErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_boolLightningErrorZ_free: extern "C" fn(CResult_boolLightningErrorZ) = crate::c_types::CResultTempl_free::; @@ -264,7 +231,6 @@ pub static CResult_boolLightningErrorZ_ok: extern "C" fn (bool) -> CResult_boolL pub static CResult_boolLightningErrorZ_err: extern "C" fn (crate::ln::msgs::LightningError) -> CResult_boolLightningErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ = crate::c_types::C3TupleTempl; #[no_mangle] pub static C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free: extern "C" fn(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) = crate::c_types::C3TupleTempl_free::; @@ -273,17 +239,14 @@ pub extern "C" fn C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { a, b, c, } } -#[no_mangle] pub type CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ = crate::c_types::CVecTempl>; #[no_mangle] pub static CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free: extern "C" fn(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ) = crate::c_types::CVecTempl_free::>; -#[no_mangle] pub type CVec_NodeAnnouncementZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_NodeAnnouncementZ_free: extern "C" fn(CVec_NodeAnnouncementZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CResult_NoneLightningErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_NoneLightningErrorZ_free: extern "C" fn(CResult_NoneLightningErrorZ) = crate::c_types::CResultTempl_free::; @@ -296,17 +259,14 @@ pub extern "C" fn CResult_NoneLightningErrorZ_ok() -> CResult_NoneLightningError pub static CResult_NoneLightningErrorZ_err: extern "C" fn (crate::ln::msgs::LightningError) -> CResult_NoneLightningErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CVec_PublicKeyZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_PublicKeyZ_free: extern "C" fn(CVec_PublicKeyZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_u8Z = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_u8Z_free: extern "C" fn(CVec_u8Z) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CResult_CVec_u8ZPeerHandleErrorZ = crate::c_types::CResultTempl, crate::ln::peer_handler::PeerHandleError>; #[no_mangle] pub static CResult_CVec_u8ZPeerHandleErrorZ_free: extern "C" fn(CResult_CVec_u8ZPeerHandleErrorZ) = crate::c_types::CResultTempl_free::, crate::ln::peer_handler::PeerHandleError>; @@ -318,7 +278,6 @@ pub static CResult_CVec_u8ZPeerHandleErrorZ_ok: extern "C" fn (CVec_u8Z) -> CRes pub static CResult_CVec_u8ZPeerHandleErrorZ_err: extern "C" fn (crate::ln::peer_handler::PeerHandleError) -> CResult_CVec_u8ZPeerHandleErrorZ = crate::c_types::CResultTempl::, crate::ln::peer_handler::PeerHandleError>::err; -#[no_mangle] pub type CResult_NonePeerHandleErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_NonePeerHandleErrorZ_free: extern "C" fn(CResult_NonePeerHandleErrorZ) = crate::c_types::CResultTempl_free::; @@ -331,7 +290,6 @@ pub extern "C" fn CResult_NonePeerHandleErrorZ_ok() -> CResult_NonePeerHandleErr pub static CResult_NonePeerHandleErrorZ_err: extern "C" fn (crate::ln::peer_handler::PeerHandleError) -> CResult_NonePeerHandleErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CResult_boolPeerHandleErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_boolPeerHandleErrorZ_free: extern "C" fn(CResult_boolPeerHandleErrorZ) = crate::c_types::CResultTempl_free::; @@ -343,7 +301,6 @@ pub static CResult_boolPeerHandleErrorZ_ok: extern "C" fn (bool) -> CResult_bool pub static CResult_boolPeerHandleErrorZ_err: extern "C" fn (crate::ln::peer_handler::PeerHandleError) -> CResult_boolPeerHandleErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CResult_SecretKeySecpErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_SecretKeySecpErrorZ_free: extern "C" fn(CResult_SecretKeySecpErrorZ) = crate::c_types::CResultTempl_free::; @@ -355,7 +312,6 @@ pub static CResult_SecretKeySecpErrorZ_ok: extern "C" fn (crate::c_types::Secret pub static CResult_SecretKeySecpErrorZ_err: extern "C" fn (crate::c_types::Secp256k1Error) -> CResult_SecretKeySecpErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CResult_PublicKeySecpErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_PublicKeySecpErrorZ_free: extern "C" fn(CResult_PublicKeySecpErrorZ) = crate::c_types::CResultTempl_free::; @@ -367,7 +323,6 @@ pub static CResult_PublicKeySecpErrorZ_ok: extern "C" fn (crate::c_types::Public pub static CResult_PublicKeySecpErrorZ_err: extern "C" fn (crate::c_types::Secp256k1Error) -> CResult_PublicKeySecpErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CResult_TxCreationKeysSecpErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_TxCreationKeysSecpErrorZ_free: extern "C" fn(CResult_TxCreationKeysSecpErrorZ) = crate::c_types::CResultTempl_free::; @@ -379,7 +334,6 @@ pub static CResult_TxCreationKeysSecpErrorZ_ok: extern "C" fn (crate::ln::chan_u pub static CResult_TxCreationKeysSecpErrorZ_err: extern "C" fn (crate::c_types::Secp256k1Error) -> CResult_TxCreationKeysSecpErrorZ = crate::c_types::CResultTempl::::err; -#[no_mangle] pub type CResult_TrustedCommitmentTransactionNoneZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_TrustedCommitmentTransactionNoneZ_free: extern "C" fn(CResult_TrustedCommitmentTransactionNoneZ) = crate::c_types::CResultTempl_free::; @@ -392,22 +346,18 @@ pub extern "C" fn CResult_TrustedCommitmentTransactionNoneZ_err() -> CResult_Tru crate::c_types::CResultTempl::err(0) } -#[no_mangle] pub type CVec_RouteHopZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_RouteHopZ_free: extern "C" fn(CVec_RouteHopZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CVec_CVec_RouteHopZZ = crate::c_types::CVecTempl>; #[no_mangle] pub static CVec_CVec_RouteHopZZ_free: extern "C" fn(CVec_CVec_RouteHopZZ) = crate::c_types::CVecTempl_free::>; -#[no_mangle] pub type CVec_RouteHintZ = crate::c_types::CVecTempl; #[no_mangle] pub static CVec_RouteHintZ_free: extern "C" fn(CVec_RouteHintZ) = crate::c_types::CVecTempl_free::; -#[no_mangle] pub type CResult_RouteLightningErrorZ = crate::c_types::CResultTempl; #[no_mangle] pub static CResult_RouteLightningErrorZ_free: extern "C" fn(CResult_RouteLightningErrorZ) = crate::c_types::CResultTempl_free::;