X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Fc_types%2Fderived.rs;h=873f815f4ba9715ffaee3bf841bfb95a54008c19;hb=d773151e7f46a97f359640e6f33acbec9b2506e8;hp=16463a1894e33c13db7da4467ece14a4512ba0bc;hpb=353e29aedd2227a1a3a6811df1d73606f63a687e;p=rust-lightning diff --git a/lightning-c-bindings/src/c_types/derived.rs b/lightning-c-bindings/src/c_types/derived.rs index 16463a18..873f815f 100644 --- a/lightning-c-bindings/src/c_types/derived.rs +++ b/lightning-c-bindings/src/c_types/derived.rs @@ -14,50 +14,91 @@ pub type CVec_EventZ = crate::c_types::CVecTempl; pub static CVec_EventZ_free: extern "C" fn(CVec_EventZ) = crate::c_types::CVecTempl_free::; #[no_mangle] -pub type C2Tuple_Txidu32Z = crate::c_types::C2TupleTempl; +pub type C2Tuple_usizeTransactionZ = crate::c_types::C2TupleTempl; #[no_mangle] -pub static C2Tuple_Txidu32Z_free: extern "C" fn(C2Tuple_Txidu32Z) = crate::c_types::C2TupleTempl_free::; +pub static C2Tuple_usizeTransactionZ_free: extern "C" fn(C2Tuple_usizeTransactionZ) = crate::c_types::C2TupleTempl_free::; #[no_mangle] -pub extern "C" fn C2Tuple_Txidu32Z_new(a: crate::c_types::ThirtyTwoBytes, b: u32) -> C2Tuple_Txidu32Z { - C2Tuple_Txidu32Z { +pub extern "C" fn C2Tuple_usizeTransactionZ_new(a: usize, b: crate::c_types::Transaction) -> C2Tuple_usizeTransactionZ { + C2Tuple_usizeTransactionZ { a: Box::into_raw(Box::new(a)), b: Box::into_raw(Box::new(b)), } } #[no_mangle] -pub type C2Tuple_Scriptu64Z = crate::c_types::C2TupleTempl; +pub type CVec_C2Tuple_usizeTransactionZZ = crate::c_types::CVecTempl>; #[no_mangle] -pub static C2Tuple_Scriptu64Z_free: extern "C" fn(C2Tuple_Scriptu64Z) = crate::c_types::C2TupleTempl_free::; +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::; +#[no_mangle] +pub extern "C" fn CResult_NoneChannelMonitorUpdateErrZ_ok() -> CResult_NoneChannelMonitorUpdateErrZ { + crate::c_types::CResultTempl::ok(0) +} + +#[no_mangle] +pub static CResult_NoneChannelMonitorUpdateErrZ_err: extern "C" fn (crate::chain::channelmonitor::ChannelMonitorUpdateErr) -> CResult_NoneChannelMonitorUpdateErrZ = + crate::c_types::CResultTempl::::err; + #[no_mangle] -pub extern "C" fn C2Tuple_Scriptu64Z_new(a: crate::c_types::derived::CVec_u8Z, b: u64) -> C2Tuple_Scriptu64Z { - C2Tuple_Scriptu64Z { +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::; +#[no_mangle] +pub extern "C" fn CResult_NoneMonitorUpdateErrorZ_ok() -> CResult_NoneMonitorUpdateErrorZ { + crate::c_types::CResultTempl::ok(0) +} + +#[no_mangle] +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::; +#[no_mangle] +pub extern "C" fn C2Tuple_OutPointScriptZ_new(a: crate::chain::transaction::OutPoint, b: crate::c_types::derived::CVec_u8Z) -> C2Tuple_OutPointScriptZ { + C2Tuple_OutPointScriptZ { a: Box::into_raw(Box::new(a)), b: Box::into_raw(Box::new(b)), } } #[no_mangle] -pub type CResult_C2Tuple_Scriptu64ZChainErrorZ = crate::c_types::CResultTempl, crate::chain::chaininterface::ChainError>; +pub type CVec_TransactionZ = crate::c_types::CVecTempl; #[no_mangle] -pub static CResult_C2Tuple_Scriptu64ZChainErrorZ_free: extern "C" fn(CResult_C2Tuple_Scriptu64ZChainErrorZ) = crate::c_types::CResultTempl_free::, crate::chain::chaininterface::ChainError>; -#[no_mangle] -pub static CResult_C2Tuple_Scriptu64ZChainErrorZ_ok: extern "C" fn (C2Tuple_Scriptu64Z) -> CResult_C2Tuple_Scriptu64ZChainErrorZ = - crate::c_types::CResultTempl::, crate::chain::chaininterface::ChainError>::ok; +pub static CVec_TransactionZ_free: extern "C" fn(CVec_TransactionZ) = crate::c_types::CVecTempl_free::; #[no_mangle] -pub static CResult_C2Tuple_Scriptu64ZChainErrorZ_err: extern "C" fn (crate::chain::chaininterface::ChainError) -> CResult_C2Tuple_Scriptu64ZChainErrorZ = - crate::c_types::CResultTempl::, crate::chain::chaininterface::ChainError>::err; +pub type CVec_TxOutZ = crate::c_types::CVecTempl; +#[no_mangle] +pub static CVec_TxOutZ_free: extern "C" fn(CVec_TxOutZ) = crate::c_types::CVecTempl_free::; #[no_mangle] -pub type CVec_usizeZ = crate::c_types::CVecTempl; +pub type C2Tuple_TxidCVec_TxOutZZ = crate::c_types::C2TupleTempl>; +#[no_mangle] +pub static C2Tuple_TxidCVec_TxOutZZ_free: extern "C" fn(C2Tuple_TxidCVec_TxOutZZ) = crate::c_types::C2TupleTempl_free::>; #[no_mangle] -pub static CVec_usizeZ_free: extern "C" fn(CVec_usizeZ) = crate::c_types::CVecTempl_free::; +pub extern "C" fn C2Tuple_TxidCVec_TxOutZZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::c_types::derived::CVec_TxOutZ) -> C2Tuple_TxidCVec_TxOutZZ { + C2Tuple_TxidCVec_TxOutZZ { + a: Box::into_raw(Box::new(a)), + b: Box::into_raw(Box::new(b)), + } +} #[no_mangle] -pub type CVec_TransactionZ = crate::c_types::CVecTempl; +pub type CVec_C2Tuple_TxidCVec_TxOutZZZ = crate::c_types::CVecTempl>>; #[no_mangle] -pub static CVec_TransactionZ_free: extern "C" fn(CVec_TransactionZ) = crate::c_types::CVecTempl_free::; +pub static CVec_C2Tuple_TxidCVec_TxOutZZZ_free: extern "C" fn(CVec_C2Tuple_TxidCVec_TxOutZZZ) = crate::c_types::CVecTempl_free::>>; #[no_mangle] pub type C2Tuple_u64u64Z = crate::c_types::C2TupleTempl; @@ -132,6 +173,18 @@ pub extern "C" fn CResult_CVec_SignatureZNoneZ_err() -> CResult_CVec_SignatureZN crate::c_types::CResultTempl::err(0) } +#[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::; +#[no_mangle] +pub static CResult_TxOutAccessErrorZ_ok: extern "C" fn (crate::c_types::TxOut) -> CResult_TxOutAccessErrorZ = + crate::c_types::CResultTempl::::ok; + +#[no_mangle] +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] @@ -169,52 +222,9 @@ pub type CVec_NetAddressZ = crate::c_types::CVecTempl; #[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 CResult_NoneChannelMonitorUpdateErrZ = crate::c_types::CResultTempl; -#[no_mangle] -pub static CResult_NoneChannelMonitorUpdateErrZ_free: extern "C" fn(CResult_NoneChannelMonitorUpdateErrZ) = crate::c_types::CResultTempl_free::; -#[no_mangle] -pub extern "C" fn CResult_NoneChannelMonitorUpdateErrZ_ok() -> CResult_NoneChannelMonitorUpdateErrZ { - crate::c_types::CResultTempl::ok(0) -} - -#[no_mangle] -pub static CResult_NoneChannelMonitorUpdateErrZ_err: extern "C" fn (crate::ln::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; +pub type CVec_ChannelMonitorZ = crate::c_types::CVecTempl; #[no_mangle] -pub static CResult_NoneMonitorUpdateErrorZ_free: extern "C" fn(CResult_NoneMonitorUpdateErrorZ) = crate::c_types::CResultTempl_free::; -#[no_mangle] -pub extern "C" fn CResult_NoneMonitorUpdateErrorZ_ok() -> CResult_NoneMonitorUpdateErrorZ { - crate::c_types::CResultTempl::ok(0) -} - -#[no_mangle] -pub static CResult_NoneMonitorUpdateErrorZ_err: extern "C" fn (crate::ln::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::; -#[no_mangle] -pub extern "C" fn C2Tuple_OutPointScriptZ_new(a: crate::chain::transaction::OutPoint, b: crate::c_types::derived::CVec_u8Z) -> C2Tuple_OutPointScriptZ { - C2Tuple_OutPointScriptZ { - a: Box::into_raw(Box::new(a)), - b: Box::into_raw(Box::new(b)), - } -} +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;