uint8_t compressed_form[33];
} LDKPublicKey;
-typedef struct LDKC2TupleTempl_u64__u64 {
+typedef struct LDKC2Tuple_u64u64Z {
uint64_t a;
uint64_t b;
-} LDKC2TupleTempl_u64__u64;
-
-typedef struct LDKC2TupleTempl_u64__u64 LDKC2Tuple_u64u64Z;
+} LDKC2Tuple_u64u64Z;
/**
* When on-chain outputs are created by rust-lightning (which our counterparty is not able to
struct LDKPublicKey per_commitment_point;
uint16_t to_self_delay;
struct LDKTxOut output;
- LDKC2Tuple_u64u64Z key_derivation_params;
+ struct LDKC2Tuple_u64u64Z key_derivation_params;
struct LDKPublicKey revocation_pubkey;
} LDKSpendableOutputDescriptor_LDKDynamicOutputP2WSH_Body;
typedef struct LDKSpendableOutputDescriptor_LDKStaticOutputCounterpartyPayment_Body {
struct LDKOutPoint outpoint;
struct LDKTxOut output;
- LDKC2Tuple_u64u64Z key_derivation_params;
+ struct LDKC2Tuple_u64u64Z key_derivation_params;
} LDKSpendableOutputDescriptor_LDKStaticOutputCounterpartyPayment_Body;
typedef struct MUST_USE_STRUCT LDKSpendableOutputDescriptor {
uintptr_t datalen;
} LDKCVec_EventZ;
-typedef struct LDKC2TupleTempl_usize__Transaction {
+typedef struct LDKC2Tuple_usizeTransactionZ {
uintptr_t a;
struct LDKTransaction b;
-} LDKC2TupleTempl_usize__Transaction;
-
-typedef struct LDKC2TupleTempl_usize__Transaction LDKC2Tuple_usizeTransactionZ;
+} LDKC2Tuple_usizeTransactionZ;
typedef struct LDKCVec_C2Tuple_usizeTransactionZZ {
- struct LDKC2TupleTempl_usize__Transaction *data;
+ struct LDKC2Tuple_usizeTransactionZ *data;
uintptr_t datalen;
} LDKCVec_C2Tuple_usizeTransactionZZ;
bool result_ok;
} LDKCResult_NoneMonitorUpdateErrorZ;
-typedef struct LDKC2TupleTempl_OutPoint__CVec_u8Z {
+typedef struct LDKC2Tuple_OutPointScriptZ {
struct LDKOutPoint a;
struct LDKCVec_u8Z b;
-} LDKC2TupleTempl_OutPoint__CVec_u8Z;
-
-typedef struct LDKC2TupleTempl_OutPoint__CVec_u8Z LDKC2Tuple_OutPointScriptZ;
+} LDKC2Tuple_OutPointScriptZ;
typedef struct LDKCVec_TransactionZ {
struct LDKTransaction *data;
uintptr_t datalen;
} LDKCVec_TransactionZ;
-typedef struct LDKC2TupleTempl_u32__TxOut {
+typedef struct LDKC2Tuple_u32TxOutZ {
uint32_t a;
struct LDKTxOut b;
-} LDKC2TupleTempl_u32__TxOut;
-
-typedef struct LDKC2TupleTempl_u32__TxOut LDKC2Tuple_u32TxOutZ;
+} LDKC2Tuple_u32TxOutZ;
typedef struct LDKCVec_C2Tuple_u32TxOutZZ {
- struct LDKC2TupleTempl_u32__TxOut *data;
+ struct LDKC2Tuple_u32TxOutZ *data;
uintptr_t datalen;
} LDKCVec_C2Tuple_u32TxOutZZ;
-typedef struct LDKC2TupleTempl_ThirtyTwoBytes__CVec_C2Tuple_u32TxOutZZ {
+typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ {
struct LDKThirtyTwoBytes a;
struct LDKCVec_C2Tuple_u32TxOutZZ b;
-} LDKC2TupleTempl_ThirtyTwoBytes__CVec_C2Tuple_u32TxOutZZ;
-
-typedef struct LDKC2TupleTempl_ThirtyTwoBytes__CVec_C2Tuple_u32TxOutZZ LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ;
+} LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ;
typedef struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ {
- struct LDKC2TupleTempl_ThirtyTwoBytes__CVec_C2Tuple_u32TxOutZZ *data;
+ struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *data;
uintptr_t datalen;
} LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ;
uintptr_t datalen;
} LDKCVec_SignatureZ;
-typedef struct LDKC2TupleTempl_Signature__CVec_SignatureZ {
+typedef struct LDKC2Tuple_SignatureCVec_SignatureZZ {
struct LDKSignature a;
struct LDKCVec_SignatureZ b;
-} LDKC2TupleTempl_Signature__CVec_SignatureZ;
+} LDKC2Tuple_SignatureCVec_SignatureZZ;
typedef union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr {
- struct LDKC2TupleTempl_Signature__CVec_SignatureZ *result;
+ struct LDKC2Tuple_SignatureCVec_SignatureZZ *result;
/**
* Note that this value is always NULL, as there are no contents in the Err variant
*/
* some SpendableOutputDescriptor types. These should be sufficient to identify this
* ChannelKeys object uniquely and lookup or re-derive its keys.
*/
- LDKC2Tuple_u64u64Z (*key_derivation_params)(const void *this_arg);
+ struct LDKC2Tuple_u64u64Z (*key_derivation_params)(const void *this_arg);
/**
* Create a signature for a counterparty's commitment transaction and associated HTLC transactions.
*
bool is_owned;
} LDKChannelMonitor;
-typedef struct LDKC2TupleTempl_ThirtyTwoBytes__ChannelMonitor {
+typedef struct LDKC2Tuple_BlockHashChannelMonitorZ {
struct LDKThirtyTwoBytes a;
struct LDKChannelMonitor b;
-} LDKC2TupleTempl_ThirtyTwoBytes__ChannelMonitor;
-
-typedef struct LDKC2TupleTempl_ThirtyTwoBytes__ChannelMonitor LDKC2Tuple_BlockHashChannelMonitorZ;
+} LDKC2Tuple_BlockHashChannelMonitorZ;
typedef union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr {
- struct LDKC2TupleTempl_ThirtyTwoBytes__ChannelMonitor *result;
+ struct LDKC2Tuple_BlockHashChannelMonitorZ *result;
struct LDKDecodeError *err;
} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr;
bool result_ok;
} LDKCResult_SpendableOutputDescriptorDecodeErrorZ;
-typedef struct LDKC2TupleTempl_Signature__CVec_SignatureZ LDKC2Tuple_SignatureCVec_SignatureZZ;
-
typedef union LDKCResult_ChanKeySignerDecodeErrorZPtr {
struct LDKChannelKeys *result;
struct LDKDecodeError *err;
bool is_owned;
} LDKChannelManager;
-typedef struct LDKC2TupleTempl_ThirtyTwoBytes__ChannelManager {
+typedef struct LDKC2Tuple_BlockHashChannelManagerZ {
struct LDKThirtyTwoBytes a;
struct LDKChannelManager b;
-} LDKC2TupleTempl_ThirtyTwoBytes__ChannelManager;
-
-typedef struct LDKC2TupleTempl_ThirtyTwoBytes__ChannelManager LDKC2Tuple_BlockHashChannelManagerZ;
+} LDKC2Tuple_BlockHashChannelManagerZ;
typedef union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr {
- struct LDKC2TupleTempl_ThirtyTwoBytes__ChannelManager *result;
+ struct LDKC2Tuple_BlockHashChannelManagerZ *result;
struct LDKDecodeError *err;
} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr;
bool result_ok;
} LDKCResult_boolLightningErrorZ;
-typedef struct LDKC3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate {
+typedef struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
struct LDKChannelAnnouncement a;
struct LDKChannelUpdate b;
struct LDKChannelUpdate c;
-} LDKC3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate;
-
-typedef struct LDKC3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ;
+} LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ;
typedef struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
- struct LDKC3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate *data;
+ struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *data;
uintptr_t datalen;
} LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ;
bool is_owned;
} LDKChannelInfo;
-extern const void (*C2Tuple_usizeTransactionZ_free)(LDKC2Tuple_usizeTransactionZ);
-
-extern const void (*C2Tuple_OutPointScriptZ_free)(LDKC2Tuple_OutPointScriptZ);
-
-extern const void (*C2Tuple_u32TxOutZ_free)(LDKC2Tuple_u32TxOutZ);
-
-extern const void (*C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free)(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ);
-
-extern const void (*C2Tuple_BlockHashChannelMonitorZ_free)(LDKC2Tuple_BlockHashChannelMonitorZ);
-
-extern const void (*C2Tuple_u64u64Z_free)(LDKC2Tuple_u64u64Z);
-
-extern const void (*C2Tuple_SignatureCVec_SignatureZZ_free)(LDKC2Tuple_SignatureCVec_SignatureZZ);
-
-extern const void (*C2Tuple_BlockHashChannelManagerZ_free)(LDKC2Tuple_BlockHashChannelManagerZ);
-
-extern const void (*C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free)(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ);
-
extern const uintptr_t MAX_BUF_SIZE;
extern const uint64_t MIN_RELAY_FEE_SAT_PER_1000_WEIGHT;
void CVec_EventZ_free(struct LDKCVec_EventZ _res);
-LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
+void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
+
+struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
-LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
+void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
+
+struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
-LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
+void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
+
+struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
-LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
+void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
+
+struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
-LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
+void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
+
+struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
-struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2TupleTempl_ThirtyTwoBytes__ChannelMonitor o);
+struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
-LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
+void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
+
+struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
-LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
+void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
-struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2TupleTempl_Signature__CVec_SignatureZ o);
+struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
+
+struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
-LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
+void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
+
+struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
-struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2TupleTempl_ThirtyTwoBytes__ChannelManager o);
+struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
-LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
+void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
+
+struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
/**
* Gets the funding transaction outpoint of the channel this ChannelMonitor is monitoring for.
*/
-MUST_USE_RES LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
+MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
/**
* Get the list of HTLCs who's status has been updated on chain. This should be called by
/**
* Create a new InMemoryChannelKeys
*/
-MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, LDKC2Tuple_u64u64Z key_derivation_params);
+MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKC2Tuple_u64u64Z key_derivation_params);
/**
* Counterparty pubkeys.
unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-pub type C2Tuple_usizeTransactionZ = crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>;
+#[repr(C)]
+pub struct C2Tuple_usizeTransactionZ {
+ pub a: usize,
+ pub b: crate::c_types::Transaction,
+}
+impl From<(usize, crate::c_types::Transaction)> for C2Tuple_usizeTransactionZ {
+ fn from (tup: (usize, crate::c_types::Transaction)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_usizeTransactionZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (usize, crate::c_types::Transaction) {
+ (self.a, self.b)
+ }
+}
#[no_mangle]
-pub static C2Tuple_usizeTransactionZ_free: extern "C" fn(C2Tuple_usizeTransactionZ) = crate::c_types::C2TupleTempl_free::<usize, crate::c_types::Transaction>;
+pub extern "C" fn C2Tuple_usizeTransactionZ_free(_res: C2Tuple_usizeTransactionZ) { }
#[no_mangle]
pub extern "C" fn C2Tuple_usizeTransactionZ_new(a: usize, b: crate::c_types::Transaction) -> C2Tuple_usizeTransactionZ {
C2Tuple_usizeTransactionZ { a, b, }
#[repr(C)]
pub struct CVec_C2Tuple_usizeTransactionZZ {
- pub data: *mut crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>,
+ pub data: *mut crate::c_types::derived::C2Tuple_usizeTransactionZ,
pub datalen: usize
}
impl CVec_C2Tuple_usizeTransactionZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>> {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_usizeTransactionZ> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = std::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_usizeTransactionZ] {
unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>>> for CVec_C2Tuple_usizeTransactionZZ {
- fn from(v: Vec<crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>>) -> Self {
+impl From<Vec<crate::c_types::derived::C2Tuple_usizeTransactionZ>> for CVec_C2Tuple_usizeTransactionZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_usizeTransactionZ>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
}
}
-pub type C2Tuple_OutPointScriptZ = crate::c_types::C2TupleTempl<crate::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z>;
+#[repr(C)]
+pub struct C2Tuple_OutPointScriptZ {
+ pub a: crate::chain::transaction::OutPoint,
+ pub b: crate::c_types::derived::CVec_u8Z,
+}
+impl From<(crate::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z)> for C2Tuple_OutPointScriptZ {
+ fn from (tup: (crate::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_OutPointScriptZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z) {
+ (self.a, self.b)
+ }
+}
#[no_mangle]
-pub static C2Tuple_OutPointScriptZ_free: extern "C" fn(C2Tuple_OutPointScriptZ) = crate::c_types::C2TupleTempl_free::<crate::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z>;
+pub extern "C" fn C2Tuple_OutPointScriptZ_free(_res: C2Tuple_OutPointScriptZ) { }
#[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, b, }
unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-pub type C2Tuple_u32TxOutZ = crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>;
+#[repr(C)]
+pub struct C2Tuple_u32TxOutZ {
+ pub a: u32,
+ pub b: crate::c_types::TxOut,
+}
+impl From<(u32, crate::c_types::TxOut)> for C2Tuple_u32TxOutZ {
+ fn from (tup: (u32, crate::c_types::TxOut)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_u32TxOutZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (u32, crate::c_types::TxOut) {
+ (self.a, self.b)
+ }
+}
#[no_mangle]
-pub static C2Tuple_u32TxOutZ_free: extern "C" fn(C2Tuple_u32TxOutZ) = crate::c_types::C2TupleTempl_free::<u32, crate::c_types::TxOut>;
+pub extern "C" fn C2Tuple_u32TxOutZ_free(_res: C2Tuple_u32TxOutZ) { }
#[no_mangle]
pub extern "C" fn C2Tuple_u32TxOutZ_new(a: u32, b: crate::c_types::TxOut) -> C2Tuple_u32TxOutZ {
C2Tuple_u32TxOutZ { a, b, }
#[repr(C)]
pub struct CVec_C2Tuple_u32TxOutZZ {
- pub data: *mut crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>,
+ pub data: *mut crate::c_types::derived::C2Tuple_u32TxOutZ,
pub datalen: usize
}
impl CVec_C2Tuple_u32TxOutZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>> {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_u32TxOutZ> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = std::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_u32TxOutZ] {
unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>> for CVec_C2Tuple_u32TxOutZZ {
- fn from(v: Vec<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>) -> Self {
+impl From<Vec<crate::c_types::derived::C2Tuple_u32TxOutZ>> for CVec_C2Tuple_u32TxOutZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_u32TxOutZ>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-pub type C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ = crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ>;
+#[repr(C)]
+pub struct C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ {
+ pub a: crate::c_types::ThirtyTwoBytes,
+ pub b: crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ,
+}
+impl From<(crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ)> for C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ {
+ fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ) {
+ (self.a, self.b)
+ }
+}
#[no_mangle]
-pub static C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free: extern "C" fn(C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ>;
+pub extern "C" fn C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ) { }
#[no_mangle]
pub extern "C" fn C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ) -> C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ {
C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { a, b, }
#[repr(C)]
pub struct CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ {
- pub data: *mut crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ>,
+ pub data: *mut crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ,
pub datalen: usize
}
impl CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ>> {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = std::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ>] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ] {
unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ>>> for CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ {
- fn from(v: Vec<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ>>) -> Self {
+impl From<Vec<crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ>> for CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-pub type C2Tuple_BlockHashChannelMonitorZ = crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>;
+#[repr(C)]
+pub struct C2Tuple_BlockHashChannelMonitorZ {
+ pub a: crate::c_types::ThirtyTwoBytes,
+ pub b: crate::chain::channelmonitor::ChannelMonitor,
+}
+impl From<(crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor)> for C2Tuple_BlockHashChannelMonitorZ {
+ fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_BlockHashChannelMonitorZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor) {
+ (self.a, self.b)
+ }
+}
#[no_mangle]
-pub static C2Tuple_BlockHashChannelMonitorZ_free: extern "C" fn(C2Tuple_BlockHashChannelMonitorZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>;
+pub extern "C" fn C2Tuple_BlockHashChannelMonitorZ_free(_res: C2Tuple_BlockHashChannelMonitorZ) { }
#[no_mangle]
pub extern "C" fn C2Tuple_BlockHashChannelMonitorZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::chain::channelmonitor::ChannelMonitor) -> C2Tuple_BlockHashChannelMonitorZ {
C2Tuple_BlockHashChannelMonitorZ { a, b, }
#[repr(C)]
pub union CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr {
- pub result: *mut crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>,
+ pub result: *mut crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ,
pub err: *mut crate::ln::msgs::DecodeError,
}
#[repr(C)]
pub result_ok: bool,
}
#[no_mangle]
-pub extern "C" fn CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>) -> CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
+pub extern "C" fn CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ) -> CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
contents: CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>, crate::ln::msgs::DecodeError>> for CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>, crate::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ, crate::ln::msgs::DecodeError>> for CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ, crate::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = std::ptr::null_mut() };
}
}
}
-pub type C2Tuple_u64u64Z = crate::c_types::C2TupleTempl<u64, u64>;
+#[repr(C)]
+pub struct C2Tuple_u64u64Z {
+ pub a: u64,
+ pub b: u64,
+}
+impl From<(u64, u64)> for C2Tuple_u64u64Z {
+ fn from (tup: (u64, u64)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_u64u64Z {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (u64, u64) {
+ (self.a, self.b)
+ }
+}
+impl Clone for C2Tuple_u64u64Z {
+ fn clone(&self) -> Self {
+ Self {
+ a: self.a.clone(),
+ b: self.b.clone(),
+ }
+ }
+}
#[no_mangle]
-pub static C2Tuple_u64u64Z_free: extern "C" fn(C2Tuple_u64u64Z) = crate::c_types::C2TupleTempl_free::<u64, u64>;
+pub extern "C" fn C2Tuple_u64u64Z_free(_res: C2Tuple_u64u64Z) { }
#[no_mangle]
pub extern "C" fn C2Tuple_u64u64Z_new(a: u64, b: u64) -> C2Tuple_u64u64Z {
C2Tuple_u64u64Z { a, b, }
unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-pub type C2Tuple_SignatureCVec_SignatureZZ = crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ>;
+#[repr(C)]
+pub struct C2Tuple_SignatureCVec_SignatureZZ {
+ pub a: crate::c_types::Signature,
+ pub b: crate::c_types::derived::CVec_SignatureZ,
+}
+impl From<(crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ)> for C2Tuple_SignatureCVec_SignatureZZ {
+ fn from (tup: (crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_SignatureCVec_SignatureZZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ) {
+ (self.a, self.b)
+ }
+}
#[no_mangle]
-pub static C2Tuple_SignatureCVec_SignatureZZ_free: extern "C" fn(C2Tuple_SignatureCVec_SignatureZZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ>;
+pub extern "C" fn C2Tuple_SignatureCVec_SignatureZZ_free(_res: C2Tuple_SignatureCVec_SignatureZZ) { }
#[no_mangle]
pub extern "C" fn C2Tuple_SignatureCVec_SignatureZZ_new(a: crate::c_types::Signature, b: crate::c_types::derived::CVec_SignatureZ) -> C2Tuple_SignatureCVec_SignatureZZ {
C2Tuple_SignatureCVec_SignatureZZ { a, b, }
#[repr(C)]
pub union CResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr {
- pub result: *mut crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ>,
+ pub result: *mut crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ,
/// Note that this value is always NULL, as there are no contents in the Err variant
pub err: *mut std::ffi::c_void,
}
pub result_ok: bool,
}
#[no_mangle]
-pub extern "C" fn CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ>) -> CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
+pub extern "C" fn CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ) -> CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
contents: CResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr {
result: Box::into_raw(Box::new(o)),
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ>, u8>> for CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::derived::CVec_SignatureZ>, u8>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ, u8>> for CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ, u8>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = std::ptr::null_mut() };
unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-pub type C2Tuple_BlockHashChannelManagerZ = crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>;
+#[repr(C)]
+pub struct C2Tuple_BlockHashChannelManagerZ {
+ pub a: crate::c_types::ThirtyTwoBytes,
+ pub b: crate::ln::channelmanager::ChannelManager,
+}
+impl From<(crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager)> for C2Tuple_BlockHashChannelManagerZ {
+ fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_BlockHashChannelManagerZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager) {
+ (self.a, self.b)
+ }
+}
#[no_mangle]
-pub static C2Tuple_BlockHashChannelManagerZ_free: extern "C" fn(C2Tuple_BlockHashChannelManagerZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>;
+pub extern "C" fn C2Tuple_BlockHashChannelManagerZ_free(_res: C2Tuple_BlockHashChannelManagerZ) { }
#[no_mangle]
pub extern "C" fn C2Tuple_BlockHashChannelManagerZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::ln::channelmanager::ChannelManager) -> C2Tuple_BlockHashChannelManagerZ {
C2Tuple_BlockHashChannelManagerZ { a, b, }
#[repr(C)]
pub union CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr {
- pub result: *mut crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>,
+ pub result: *mut crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ,
pub err: *mut crate::ln::msgs::DecodeError,
}
#[repr(C)]
pub result_ok: bool,
}
#[no_mangle]
-pub extern "C" fn CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>) -> CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
+pub extern "C" fn CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ) -> CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
contents: CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>, crate::ln::msgs::DecodeError>> for CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>, crate::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ, crate::ln::msgs::DecodeError>> for CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ, crate::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = std::ptr::null_mut() };
}
}
}
-pub type C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ = crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>;
+#[repr(C)]
+pub struct C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
+ pub a: crate::ln::msgs::ChannelAnnouncement,
+ pub b: crate::ln::msgs::ChannelUpdate,
+ pub c: crate::ln::msgs::ChannelUpdate,
+}
+impl From<(crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate)> for C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
+ fn from (tup: (crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ c: tup.2,
+ }
+ }
+}
+impl C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate) {
+ (self.a, self.b, self.c)
+ }
+}
#[no_mangle]
-pub static C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free: extern "C" fn(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) = crate::c_types::C3TupleTempl_free::<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>;
+pub extern "C" fn C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) { }
#[no_mangle]
pub extern "C" fn C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: crate::ln::msgs::ChannelAnnouncement, b: crate::ln::msgs::ChannelUpdate, c: crate::ln::msgs::ChannelUpdate) -> C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { a, b, c, }
#[repr(C)]
pub struct CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
- pub data: *mut crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>,
+ pub data: *mut crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ,
pub datalen: usize
}
impl CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>> {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = std::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ] {
unsafe { std::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>>> for CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
- fn from(v: Vec<crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>>) -> Self {
+impl From<Vec<crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ>> for CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ {
+ fn from(v: Vec<crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }