1 pub type CVec_SpendableOutputDescriptorZ = crate::c_types::CVecTempl<crate::chain::keysinterface::SpendableOutputDescriptor>;
3 pub static CVec_SpendableOutputDescriptorZ_free: extern "C" fn(CVec_SpendableOutputDescriptorZ) = crate::c_types::CVecTempl_free::<crate::chain::keysinterface::SpendableOutputDescriptor>;
5 pub type CVec_MessageSendEventZ = crate::c_types::CVecTempl<crate::util::events::MessageSendEvent>;
7 pub static CVec_MessageSendEventZ_free: extern "C" fn(CVec_MessageSendEventZ) = crate::c_types::CVecTempl_free::<crate::util::events::MessageSendEvent>;
9 pub type CVec_EventZ = crate::c_types::CVecTempl<crate::util::events::Event>;
11 pub static CVec_EventZ_free: extern "C" fn(CVec_EventZ) = crate::c_types::CVecTempl_free::<crate::util::events::Event>;
13 pub type C2Tuple_usizeTransactionZ = crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>;
15 pub static C2Tuple_usizeTransactionZ_free: extern "C" fn(C2Tuple_usizeTransactionZ) = crate::c_types::C2TupleTempl_free::<usize, crate::c_types::Transaction>;
17 pub extern "C" fn C2Tuple_usizeTransactionZ_new(a: usize, b: crate::c_types::Transaction) -> C2Tuple_usizeTransactionZ {
18 C2Tuple_usizeTransactionZ { a, b, }
21 pub type CVec_C2Tuple_usizeTransactionZZ = crate::c_types::CVecTempl<crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>>;
23 pub static CVec_C2Tuple_usizeTransactionZZ_free: extern "C" fn(CVec_C2Tuple_usizeTransactionZZ) = crate::c_types::CVecTempl_free::<crate::c_types::C2TupleTempl<usize, crate::c_types::Transaction>>;
26 pub union CResult_NoneChannelMonitorUpdateErrZPtr {
27 /// Note that this value is always NULL, as there are no contents in the OK variant
28 pub result: *mut std::ffi::c_void,
29 pub err: *mut crate::chain::channelmonitor::ChannelMonitorUpdateErr,
32 pub struct CResult_NoneChannelMonitorUpdateErrZ {
33 pub contents: CResult_NoneChannelMonitorUpdateErrZPtr,
37 pub extern "C" fn CResult_NoneChannelMonitorUpdateErrZ_ok() -> CResult_NoneChannelMonitorUpdateErrZ {
38 CResult_NoneChannelMonitorUpdateErrZ {
39 contents: CResult_NoneChannelMonitorUpdateErrZPtr {
40 result: std::ptr::null_mut(),
46 pub extern "C" fn CResult_NoneChannelMonitorUpdateErrZ_err(e: crate::chain::channelmonitor::ChannelMonitorUpdateErr) -> CResult_NoneChannelMonitorUpdateErrZ {
47 CResult_NoneChannelMonitorUpdateErrZ {
48 contents: CResult_NoneChannelMonitorUpdateErrZPtr {
49 err: Box::into_raw(Box::new(e)),
55 pub extern "C" fn CResult_NoneChannelMonitorUpdateErrZ_free(_res: CResult_NoneChannelMonitorUpdateErrZ) { }
56 impl Drop for CResult_NoneChannelMonitorUpdateErrZ {
60 if unsafe { !(self.contents.err as *mut ()).is_null() } {
61 let _ = unsafe { Box::from_raw(self.contents.err) };
66 impl From<crate::c_types::CResultTempl<u8, crate::chain::channelmonitor::ChannelMonitorUpdateErr>> for CResult_NoneChannelMonitorUpdateErrZ {
67 fn from(mut o: crate::c_types::CResultTempl<u8, crate::chain::channelmonitor::ChannelMonitorUpdateErr>) -> Self {
68 let contents = if o.result_ok {
69 let _ = unsafe { Box::from_raw(o.contents.result) };
70 o.contents.result = std::ptr::null_mut();
71 CResult_NoneChannelMonitorUpdateErrZPtr { result: std::ptr::null_mut() }
73 let err = unsafe { o.contents.err };
74 unsafe { o.contents.err = std::ptr::null_mut(); }
75 CResult_NoneChannelMonitorUpdateErrZPtr { err }
79 result_ok: o.result_ok,
83 pub type CVec_MonitorEventZ = crate::c_types::CVecTempl<crate::chain::channelmonitor::MonitorEvent>;
85 pub static CVec_MonitorEventZ_free: extern "C" fn(CVec_MonitorEventZ) = crate::c_types::CVecTempl_free::<crate::chain::channelmonitor::MonitorEvent>;
88 pub union CResult_ChannelMonitorUpdateDecodeErrorZPtr {
89 pub result: *mut crate::chain::channelmonitor::ChannelMonitorUpdate,
90 pub err: *mut crate::ln::msgs::DecodeError,
93 pub struct CResult_ChannelMonitorUpdateDecodeErrorZ {
94 pub contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr,
98 pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: crate::chain::channelmonitor::ChannelMonitorUpdate) -> CResult_ChannelMonitorUpdateDecodeErrorZ {
99 CResult_ChannelMonitorUpdateDecodeErrorZ {
100 contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
101 result: Box::into_raw(Box::new(o)),
107 pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_ChannelMonitorUpdateDecodeErrorZ {
108 CResult_ChannelMonitorUpdateDecodeErrorZ {
109 contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
110 err: Box::into_raw(Box::new(e)),
116 pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: CResult_ChannelMonitorUpdateDecodeErrorZ) { }
117 impl Drop for CResult_ChannelMonitorUpdateDecodeErrorZ {
120 if unsafe { !(self.contents.result as *mut ()).is_null() } {
121 let _ = unsafe { Box::from_raw(self.contents.result) };
124 if unsafe { !(self.contents.err as *mut ()).is_null() } {
125 let _ = unsafe { Box::from_raw(self.contents.err) };
130 impl From<crate::c_types::CResultTempl<crate::chain::channelmonitor::ChannelMonitorUpdate, crate::ln::msgs::DecodeError>> for CResult_ChannelMonitorUpdateDecodeErrorZ {
131 fn from(mut o: crate::c_types::CResultTempl<crate::chain::channelmonitor::ChannelMonitorUpdate, crate::ln::msgs::DecodeError>) -> Self {
132 let contents = if o.result_ok {
133 let result = unsafe { o.contents.result };
134 unsafe { o.contents.result = std::ptr::null_mut() };
135 CResult_ChannelMonitorUpdateDecodeErrorZPtr { result }
137 let err = unsafe { o.contents.err };
138 unsafe { o.contents.err = std::ptr::null_mut(); }
139 CResult_ChannelMonitorUpdateDecodeErrorZPtr { err }
143 result_ok: o.result_ok,
148 pub union CResult_NoneMonitorUpdateErrorZPtr {
149 /// Note that this value is always NULL, as there are no contents in the OK variant
150 pub result: *mut std::ffi::c_void,
151 pub err: *mut crate::chain::channelmonitor::MonitorUpdateError,
154 pub struct CResult_NoneMonitorUpdateErrorZ {
155 pub contents: CResult_NoneMonitorUpdateErrorZPtr,
159 pub extern "C" fn CResult_NoneMonitorUpdateErrorZ_ok() -> CResult_NoneMonitorUpdateErrorZ {
160 CResult_NoneMonitorUpdateErrorZ {
161 contents: CResult_NoneMonitorUpdateErrorZPtr {
162 result: std::ptr::null_mut(),
168 pub extern "C" fn CResult_NoneMonitorUpdateErrorZ_err(e: crate::chain::channelmonitor::MonitorUpdateError) -> CResult_NoneMonitorUpdateErrorZ {
169 CResult_NoneMonitorUpdateErrorZ {
170 contents: CResult_NoneMonitorUpdateErrorZPtr {
171 err: Box::into_raw(Box::new(e)),
177 pub extern "C" fn CResult_NoneMonitorUpdateErrorZ_free(_res: CResult_NoneMonitorUpdateErrorZ) { }
178 impl Drop for CResult_NoneMonitorUpdateErrorZ {
182 if unsafe { !(self.contents.err as *mut ()).is_null() } {
183 let _ = unsafe { Box::from_raw(self.contents.err) };
188 impl From<crate::c_types::CResultTempl<u8, crate::chain::channelmonitor::MonitorUpdateError>> for CResult_NoneMonitorUpdateErrorZ {
189 fn from(mut o: crate::c_types::CResultTempl<u8, crate::chain::channelmonitor::MonitorUpdateError>) -> Self {
190 let contents = if o.result_ok {
191 let _ = unsafe { Box::from_raw(o.contents.result) };
192 o.contents.result = std::ptr::null_mut();
193 CResult_NoneMonitorUpdateErrorZPtr { result: std::ptr::null_mut() }
195 let err = unsafe { o.contents.err };
196 unsafe { o.contents.err = std::ptr::null_mut(); }
197 CResult_NoneMonitorUpdateErrorZPtr { err }
201 result_ok: o.result_ok,
205 pub type C2Tuple_OutPointScriptZ = crate::c_types::C2TupleTempl<crate::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z>;
207 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>;
209 pub extern "C" fn C2Tuple_OutPointScriptZ_new(a: crate::chain::transaction::OutPoint, b: crate::c_types::derived::CVec_u8Z) -> C2Tuple_OutPointScriptZ {
210 C2Tuple_OutPointScriptZ { a, b, }
213 pub type CVec_TransactionZ = crate::c_types::CVecTempl<crate::c_types::Transaction>;
215 pub static CVec_TransactionZ_free: extern "C" fn(CVec_TransactionZ) = crate::c_types::CVecTempl_free::<crate::c_types::Transaction>;
217 pub type C2Tuple_u32TxOutZ = crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>;
219 pub static C2Tuple_u32TxOutZ_free: extern "C" fn(C2Tuple_u32TxOutZ) = crate::c_types::C2TupleTempl_free::<u32, crate::c_types::TxOut>;
221 pub extern "C" fn C2Tuple_u32TxOutZ_new(a: u32, b: crate::c_types::TxOut) -> C2Tuple_u32TxOutZ {
222 C2Tuple_u32TxOutZ { a, b, }
225 pub type CVec_C2Tuple_u32TxOutZZ = crate::c_types::CVecTempl<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>;
227 pub static CVec_C2Tuple_u32TxOutZZ_free: extern "C" fn(CVec_C2Tuple_u32TxOutZZ) = crate::c_types::CVecTempl_free::<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>;
229 pub type C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ = crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::CVecTempl<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>>;
231 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::CVecTempl<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>>;
233 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 {
234 C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { a, b, }
237 pub type CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ = crate::c_types::CVecTempl<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::CVecTempl<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>>>;
239 pub static CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free: extern "C" fn(CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ) = crate::c_types::CVecTempl_free::<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::CVecTempl<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>>>;
241 pub type C2Tuple_BlockHashChannelMonitorZ = crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>;
243 pub static C2Tuple_BlockHashChannelMonitorZ_free: extern "C" fn(C2Tuple_BlockHashChannelMonitorZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>;
245 pub extern "C" fn C2Tuple_BlockHashChannelMonitorZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::chain::channelmonitor::ChannelMonitor) -> C2Tuple_BlockHashChannelMonitorZ {
246 C2Tuple_BlockHashChannelMonitorZ { a, b, }
250 pub union CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr {
251 pub result: *mut crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>,
252 pub err: *mut crate::ln::msgs::DecodeError,
255 pub struct CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
256 pub contents: CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr,
260 pub extern "C" fn CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>) -> CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
261 CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
262 contents: CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr {
263 result: Box::into_raw(Box::new(o)),
269 pub extern "C" fn CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
270 CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
271 contents: CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr {
272 err: Box::into_raw(Box::new(e)),
278 pub extern "C" fn CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ) { }
279 impl Drop for CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
282 if unsafe { !(self.contents.result as *mut ()).is_null() } {
283 let _ = unsafe { Box::from_raw(self.contents.result) };
286 if unsafe { !(self.contents.err as *mut ()).is_null() } {
287 let _ = unsafe { Box::from_raw(self.contents.err) };
292 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 {
293 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 {
294 let contents = if o.result_ok {
295 let result = unsafe { o.contents.result };
296 unsafe { o.contents.result = std::ptr::null_mut() };
297 CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr { result }
299 let err = unsafe { o.contents.err };
300 unsafe { o.contents.err = std::ptr::null_mut(); }
301 CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr { err }
305 result_ok: o.result_ok,
309 pub type C2Tuple_u64u64Z = crate::c_types::C2TupleTempl<u64, u64>;
311 pub static C2Tuple_u64u64Z_free: extern "C" fn(C2Tuple_u64u64Z) = crate::c_types::C2TupleTempl_free::<u64, u64>;
313 pub extern "C" fn C2Tuple_u64u64Z_new(a: u64, b: u64) -> C2Tuple_u64u64Z {
314 C2Tuple_u64u64Z { a, b, }
318 pub union CResult_SpendableOutputDescriptorDecodeErrorZPtr {
319 pub result: *mut crate::chain::keysinterface::SpendableOutputDescriptor,
320 pub err: *mut crate::ln::msgs::DecodeError,
323 pub struct CResult_SpendableOutputDescriptorDecodeErrorZ {
324 pub contents: CResult_SpendableOutputDescriptorDecodeErrorZPtr,
328 pub extern "C" fn CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: crate::chain::keysinterface::SpendableOutputDescriptor) -> CResult_SpendableOutputDescriptorDecodeErrorZ {
329 CResult_SpendableOutputDescriptorDecodeErrorZ {
330 contents: CResult_SpendableOutputDescriptorDecodeErrorZPtr {
331 result: Box::into_raw(Box::new(o)),
337 pub extern "C" fn CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_SpendableOutputDescriptorDecodeErrorZ {
338 CResult_SpendableOutputDescriptorDecodeErrorZ {
339 contents: CResult_SpendableOutputDescriptorDecodeErrorZPtr {
340 err: Box::into_raw(Box::new(e)),
346 pub extern "C" fn CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: CResult_SpendableOutputDescriptorDecodeErrorZ) { }
347 impl Drop for CResult_SpendableOutputDescriptorDecodeErrorZ {
350 if unsafe { !(self.contents.result as *mut ()).is_null() } {
351 let _ = unsafe { Box::from_raw(self.contents.result) };
354 if unsafe { !(self.contents.err as *mut ()).is_null() } {
355 let _ = unsafe { Box::from_raw(self.contents.err) };
360 impl From<crate::c_types::CResultTempl<crate::chain::keysinterface::SpendableOutputDescriptor, crate::ln::msgs::DecodeError>> for CResult_SpendableOutputDescriptorDecodeErrorZ {
361 fn from(mut o: crate::c_types::CResultTempl<crate::chain::keysinterface::SpendableOutputDescriptor, crate::ln::msgs::DecodeError>) -> Self {
362 let contents = if o.result_ok {
363 let result = unsafe { o.contents.result };
364 unsafe { o.contents.result = std::ptr::null_mut() };
365 CResult_SpendableOutputDescriptorDecodeErrorZPtr { result }
367 let err = unsafe { o.contents.err };
368 unsafe { o.contents.err = std::ptr::null_mut(); }
369 CResult_SpendableOutputDescriptorDecodeErrorZPtr { err }
373 result_ok: o.result_ok,
377 pub type CVec_SignatureZ = crate::c_types::CVecTempl<crate::c_types::Signature>;
379 pub static CVec_SignatureZ_free: extern "C" fn(CVec_SignatureZ) = crate::c_types::CVecTempl_free::<crate::c_types::Signature>;
381 pub type C2Tuple_SignatureCVec_SignatureZZ = crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::CVecTempl<crate::c_types::Signature>>;
383 pub static C2Tuple_SignatureCVec_SignatureZZ_free: extern "C" fn(C2Tuple_SignatureCVec_SignatureZZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::Signature, crate::c_types::CVecTempl<crate::c_types::Signature>>;
385 pub extern "C" fn C2Tuple_SignatureCVec_SignatureZZ_new(a: crate::c_types::Signature, b: crate::c_types::derived::CVec_SignatureZ) -> C2Tuple_SignatureCVec_SignatureZZ {
386 C2Tuple_SignatureCVec_SignatureZZ { a, b, }
390 pub union CResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr {
391 pub result: *mut crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::CVecTempl<crate::c_types::Signature>>,
392 /// Note that this value is always NULL, as there are no contents in the Err variant
393 pub err: *mut std::ffi::c_void,
396 pub struct CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
397 pub contents: CResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr,
401 pub extern "C" fn CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::CVecTempl<crate::c_types::Signature>>) -> CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
402 CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
403 contents: CResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr {
404 result: Box::into_raw(Box::new(o)),
410 pub extern "C" fn CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err() -> CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
411 CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
412 contents: CResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr {
413 err: std::ptr::null_mut(),
419 pub extern "C" fn CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ) { }
420 impl Drop for CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
423 if unsafe { !(self.contents.result as *mut ()).is_null() } {
424 let _ = unsafe { Box::from_raw(self.contents.result) };
430 impl From<crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::CVecTempl<crate::c_types::Signature>>, u8>> for CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ {
431 fn from(mut o: crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::Signature, crate::c_types::CVecTempl<crate::c_types::Signature>>, u8>) -> Self {
432 let contents = if o.result_ok {
433 let result = unsafe { o.contents.result };
434 unsafe { o.contents.result = std::ptr::null_mut() };
435 CResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr { result }
437 let _ = unsafe { Box::from_raw(o.contents.err) };
438 o.contents.err = std::ptr::null_mut();
439 CResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr { err: std::ptr::null_mut() }
443 result_ok: o.result_ok,
448 pub union CResult_SignatureNoneZPtr {
449 pub result: *mut crate::c_types::Signature,
450 /// Note that this value is always NULL, as there are no contents in the Err variant
451 pub err: *mut std::ffi::c_void,
454 pub struct CResult_SignatureNoneZ {
455 pub contents: CResult_SignatureNoneZPtr,
459 pub extern "C" fn CResult_SignatureNoneZ_ok(o: crate::c_types::Signature) -> CResult_SignatureNoneZ {
460 CResult_SignatureNoneZ {
461 contents: CResult_SignatureNoneZPtr {
462 result: Box::into_raw(Box::new(o)),
468 pub extern "C" fn CResult_SignatureNoneZ_err() -> CResult_SignatureNoneZ {
469 CResult_SignatureNoneZ {
470 contents: CResult_SignatureNoneZPtr {
471 err: std::ptr::null_mut(),
477 pub extern "C" fn CResult_SignatureNoneZ_free(_res: CResult_SignatureNoneZ) { }
478 impl Drop for CResult_SignatureNoneZ {
481 if unsafe { !(self.contents.result as *mut ()).is_null() } {
482 let _ = unsafe { Box::from_raw(self.contents.result) };
488 impl From<crate::c_types::CResultTempl<crate::c_types::Signature, u8>> for CResult_SignatureNoneZ {
489 fn from(mut o: crate::c_types::CResultTempl<crate::c_types::Signature, u8>) -> Self {
490 let contents = if o.result_ok {
491 let result = unsafe { o.contents.result };
492 unsafe { o.contents.result = std::ptr::null_mut() };
493 CResult_SignatureNoneZPtr { result }
495 let _ = unsafe { Box::from_raw(o.contents.err) };
496 o.contents.err = std::ptr::null_mut();
497 CResult_SignatureNoneZPtr { err: std::ptr::null_mut() }
501 result_ok: o.result_ok,
506 pub union CResult_CVec_SignatureZNoneZPtr {
507 pub result: *mut crate::c_types::CVecTempl<crate::c_types::Signature>,
508 /// Note that this value is always NULL, as there are no contents in the Err variant
509 pub err: *mut std::ffi::c_void,
512 pub struct CResult_CVec_SignatureZNoneZ {
513 pub contents: CResult_CVec_SignatureZNoneZPtr,
517 pub extern "C" fn CResult_CVec_SignatureZNoneZ_ok(o: crate::c_types::CVecTempl<crate::c_types::Signature>) -> CResult_CVec_SignatureZNoneZ {
518 CResult_CVec_SignatureZNoneZ {
519 contents: CResult_CVec_SignatureZNoneZPtr {
520 result: Box::into_raw(Box::new(o)),
526 pub extern "C" fn CResult_CVec_SignatureZNoneZ_err() -> CResult_CVec_SignatureZNoneZ {
527 CResult_CVec_SignatureZNoneZ {
528 contents: CResult_CVec_SignatureZNoneZPtr {
529 err: std::ptr::null_mut(),
535 pub extern "C" fn CResult_CVec_SignatureZNoneZ_free(_res: CResult_CVec_SignatureZNoneZ) { }
536 impl Drop for CResult_CVec_SignatureZNoneZ {
539 if unsafe { !(self.contents.result as *mut ()).is_null() } {
540 let _ = unsafe { Box::from_raw(self.contents.result) };
546 impl From<crate::c_types::CResultTempl<crate::c_types::CVecTempl<crate::c_types::Signature>, u8>> for CResult_CVec_SignatureZNoneZ {
547 fn from(mut o: crate::c_types::CResultTempl<crate::c_types::CVecTempl<crate::c_types::Signature>, u8>) -> Self {
548 let contents = if o.result_ok {
549 let result = unsafe { o.contents.result };
550 unsafe { o.contents.result = std::ptr::null_mut() };
551 CResult_CVec_SignatureZNoneZPtr { result }
553 let _ = unsafe { Box::from_raw(o.contents.err) };
554 o.contents.err = std::ptr::null_mut();
555 CResult_CVec_SignatureZNoneZPtr { err: std::ptr::null_mut() }
559 result_ok: o.result_ok,
564 pub union CResult_ChanKeySignerDecodeErrorZPtr {
565 pub result: *mut crate::chain::keysinterface::ChannelKeys,
566 pub err: *mut crate::ln::msgs::DecodeError,
569 pub struct CResult_ChanKeySignerDecodeErrorZ {
570 pub contents: CResult_ChanKeySignerDecodeErrorZPtr,
574 pub extern "C" fn CResult_ChanKeySignerDecodeErrorZ_ok(o: crate::chain::keysinterface::ChannelKeys) -> CResult_ChanKeySignerDecodeErrorZ {
575 CResult_ChanKeySignerDecodeErrorZ {
576 contents: CResult_ChanKeySignerDecodeErrorZPtr {
577 result: Box::into_raw(Box::new(o)),
583 pub extern "C" fn CResult_ChanKeySignerDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_ChanKeySignerDecodeErrorZ {
584 CResult_ChanKeySignerDecodeErrorZ {
585 contents: CResult_ChanKeySignerDecodeErrorZPtr {
586 err: Box::into_raw(Box::new(e)),
592 pub extern "C" fn CResult_ChanKeySignerDecodeErrorZ_free(_res: CResult_ChanKeySignerDecodeErrorZ) { }
593 impl Drop for CResult_ChanKeySignerDecodeErrorZ {
596 if unsafe { !(self.contents.result as *mut ()).is_null() } {
597 let _ = unsafe { Box::from_raw(self.contents.result) };
600 if unsafe { !(self.contents.err as *mut ()).is_null() } {
601 let _ = unsafe { Box::from_raw(self.contents.err) };
606 impl From<crate::c_types::CResultTempl<crate::chain::keysinterface::ChannelKeys, crate::ln::msgs::DecodeError>> for CResult_ChanKeySignerDecodeErrorZ {
607 fn from(mut o: crate::c_types::CResultTempl<crate::chain::keysinterface::ChannelKeys, crate::ln::msgs::DecodeError>) -> Self {
608 let contents = if o.result_ok {
609 let result = unsafe { o.contents.result };
610 unsafe { o.contents.result = std::ptr::null_mut() };
611 CResult_ChanKeySignerDecodeErrorZPtr { result }
613 let err = unsafe { o.contents.err };
614 unsafe { o.contents.err = std::ptr::null_mut(); }
615 CResult_ChanKeySignerDecodeErrorZPtr { err }
619 result_ok: o.result_ok,
624 pub union CResult_InMemoryChannelKeysDecodeErrorZPtr {
625 pub result: *mut crate::chain::keysinterface::InMemoryChannelKeys,
626 pub err: *mut crate::ln::msgs::DecodeError,
629 pub struct CResult_InMemoryChannelKeysDecodeErrorZ {
630 pub contents: CResult_InMemoryChannelKeysDecodeErrorZPtr,
634 pub extern "C" fn CResult_InMemoryChannelKeysDecodeErrorZ_ok(o: crate::chain::keysinterface::InMemoryChannelKeys) -> CResult_InMemoryChannelKeysDecodeErrorZ {
635 CResult_InMemoryChannelKeysDecodeErrorZ {
636 contents: CResult_InMemoryChannelKeysDecodeErrorZPtr {
637 result: Box::into_raw(Box::new(o)),
643 pub extern "C" fn CResult_InMemoryChannelKeysDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_InMemoryChannelKeysDecodeErrorZ {
644 CResult_InMemoryChannelKeysDecodeErrorZ {
645 contents: CResult_InMemoryChannelKeysDecodeErrorZPtr {
646 err: Box::into_raw(Box::new(e)),
652 pub extern "C" fn CResult_InMemoryChannelKeysDecodeErrorZ_free(_res: CResult_InMemoryChannelKeysDecodeErrorZ) { }
653 impl Drop for CResult_InMemoryChannelKeysDecodeErrorZ {
656 if unsafe { !(self.contents.result as *mut ()).is_null() } {
657 let _ = unsafe { Box::from_raw(self.contents.result) };
660 if unsafe { !(self.contents.err as *mut ()).is_null() } {
661 let _ = unsafe { Box::from_raw(self.contents.err) };
666 impl From<crate::c_types::CResultTempl<crate::chain::keysinterface::InMemoryChannelKeys, crate::ln::msgs::DecodeError>> for CResult_InMemoryChannelKeysDecodeErrorZ {
667 fn from(mut o: crate::c_types::CResultTempl<crate::chain::keysinterface::InMemoryChannelKeys, crate::ln::msgs::DecodeError>) -> Self {
668 let contents = if o.result_ok {
669 let result = unsafe { o.contents.result };
670 unsafe { o.contents.result = std::ptr::null_mut() };
671 CResult_InMemoryChannelKeysDecodeErrorZPtr { result }
673 let err = unsafe { o.contents.err };
674 unsafe { o.contents.err = std::ptr::null_mut(); }
675 CResult_InMemoryChannelKeysDecodeErrorZPtr { err }
679 result_ok: o.result_ok,
684 pub union CResult_TxOutAccessErrorZPtr {
685 pub result: *mut crate::c_types::TxOut,
686 pub err: *mut crate::chain::AccessError,
689 pub struct CResult_TxOutAccessErrorZ {
690 pub contents: CResult_TxOutAccessErrorZPtr,
694 pub extern "C" fn CResult_TxOutAccessErrorZ_ok(o: crate::c_types::TxOut) -> CResult_TxOutAccessErrorZ {
695 CResult_TxOutAccessErrorZ {
696 contents: CResult_TxOutAccessErrorZPtr {
697 result: Box::into_raw(Box::new(o)),
703 pub extern "C" fn CResult_TxOutAccessErrorZ_err(e: crate::chain::AccessError) -> CResult_TxOutAccessErrorZ {
704 CResult_TxOutAccessErrorZ {
705 contents: CResult_TxOutAccessErrorZPtr {
706 err: Box::into_raw(Box::new(e)),
712 pub extern "C" fn CResult_TxOutAccessErrorZ_free(_res: CResult_TxOutAccessErrorZ) { }
713 impl Drop for CResult_TxOutAccessErrorZ {
716 if unsafe { !(self.contents.result as *mut ()).is_null() } {
717 let _ = unsafe { Box::from_raw(self.contents.result) };
720 if unsafe { !(self.contents.err as *mut ()).is_null() } {
721 let _ = unsafe { Box::from_raw(self.contents.err) };
726 impl From<crate::c_types::CResultTempl<crate::c_types::TxOut, crate::chain::AccessError>> for CResult_TxOutAccessErrorZ {
727 fn from(mut o: crate::c_types::CResultTempl<crate::c_types::TxOut, crate::chain::AccessError>) -> Self {
728 let contents = if o.result_ok {
729 let result = unsafe { o.contents.result };
730 unsafe { o.contents.result = std::ptr::null_mut() };
731 CResult_TxOutAccessErrorZPtr { result }
733 let err = unsafe { o.contents.err };
734 unsafe { o.contents.err = std::ptr::null_mut(); }
735 CResult_TxOutAccessErrorZPtr { err }
739 result_ok: o.result_ok,
744 pub union CResult_NoneAPIErrorZPtr {
745 /// Note that this value is always NULL, as there are no contents in the OK variant
746 pub result: *mut std::ffi::c_void,
747 pub err: *mut crate::util::errors::APIError,
750 pub struct CResult_NoneAPIErrorZ {
751 pub contents: CResult_NoneAPIErrorZPtr,
755 pub extern "C" fn CResult_NoneAPIErrorZ_ok() -> CResult_NoneAPIErrorZ {
756 CResult_NoneAPIErrorZ {
757 contents: CResult_NoneAPIErrorZPtr {
758 result: std::ptr::null_mut(),
764 pub extern "C" fn CResult_NoneAPIErrorZ_err(e: crate::util::errors::APIError) -> CResult_NoneAPIErrorZ {
765 CResult_NoneAPIErrorZ {
766 contents: CResult_NoneAPIErrorZPtr {
767 err: Box::into_raw(Box::new(e)),
773 pub extern "C" fn CResult_NoneAPIErrorZ_free(_res: CResult_NoneAPIErrorZ) { }
774 impl Drop for CResult_NoneAPIErrorZ {
778 if unsafe { !(self.contents.err as *mut ()).is_null() } {
779 let _ = unsafe { Box::from_raw(self.contents.err) };
784 impl From<crate::c_types::CResultTempl<u8, crate::util::errors::APIError>> for CResult_NoneAPIErrorZ {
785 fn from(mut o: crate::c_types::CResultTempl<u8, crate::util::errors::APIError>) -> Self {
786 let contents = if o.result_ok {
787 let _ = unsafe { Box::from_raw(o.contents.result) };
788 o.contents.result = std::ptr::null_mut();
789 CResult_NoneAPIErrorZPtr { result: std::ptr::null_mut() }
791 let err = unsafe { o.contents.err };
792 unsafe { o.contents.err = std::ptr::null_mut(); }
793 CResult_NoneAPIErrorZPtr { err }
797 result_ok: o.result_ok,
801 pub type CVec_ChannelDetailsZ = crate::c_types::CVecTempl<crate::ln::channelmanager::ChannelDetails>;
803 pub static CVec_ChannelDetailsZ_free: extern "C" fn(CVec_ChannelDetailsZ) = crate::c_types::CVecTempl_free::<crate::ln::channelmanager::ChannelDetails>;
806 pub union CResult_NonePaymentSendFailureZPtr {
807 /// Note that this value is always NULL, as there are no contents in the OK variant
808 pub result: *mut std::ffi::c_void,
809 pub err: *mut crate::ln::channelmanager::PaymentSendFailure,
812 pub struct CResult_NonePaymentSendFailureZ {
813 pub contents: CResult_NonePaymentSendFailureZPtr,
817 pub extern "C" fn CResult_NonePaymentSendFailureZ_ok() -> CResult_NonePaymentSendFailureZ {
818 CResult_NonePaymentSendFailureZ {
819 contents: CResult_NonePaymentSendFailureZPtr {
820 result: std::ptr::null_mut(),
826 pub extern "C" fn CResult_NonePaymentSendFailureZ_err(e: crate::ln::channelmanager::PaymentSendFailure) -> CResult_NonePaymentSendFailureZ {
827 CResult_NonePaymentSendFailureZ {
828 contents: CResult_NonePaymentSendFailureZPtr {
829 err: Box::into_raw(Box::new(e)),
835 pub extern "C" fn CResult_NonePaymentSendFailureZ_free(_res: CResult_NonePaymentSendFailureZ) { }
836 impl Drop for CResult_NonePaymentSendFailureZ {
840 if unsafe { !(self.contents.err as *mut ()).is_null() } {
841 let _ = unsafe { Box::from_raw(self.contents.err) };
846 impl From<crate::c_types::CResultTempl<u8, crate::ln::channelmanager::PaymentSendFailure>> for CResult_NonePaymentSendFailureZ {
847 fn from(mut o: crate::c_types::CResultTempl<u8, crate::ln::channelmanager::PaymentSendFailure>) -> Self {
848 let contents = if o.result_ok {
849 let _ = unsafe { Box::from_raw(o.contents.result) };
850 o.contents.result = std::ptr::null_mut();
851 CResult_NonePaymentSendFailureZPtr { result: std::ptr::null_mut() }
853 let err = unsafe { o.contents.err };
854 unsafe { o.contents.err = std::ptr::null_mut(); }
855 CResult_NonePaymentSendFailureZPtr { err }
859 result_ok: o.result_ok,
863 pub type CVec_NetAddressZ = crate::c_types::CVecTempl<crate::ln::msgs::NetAddress>;
865 pub static CVec_NetAddressZ_free: extern "C" fn(CVec_NetAddressZ) = crate::c_types::CVecTempl_free::<crate::ln::msgs::NetAddress>;
867 pub type CVec_ChannelMonitorZ = crate::c_types::CVecTempl<crate::chain::channelmonitor::ChannelMonitor>;
869 pub static CVec_ChannelMonitorZ_free: extern "C" fn(CVec_ChannelMonitorZ) = crate::c_types::CVecTempl_free::<crate::chain::channelmonitor::ChannelMonitor>;
871 pub type C2Tuple_BlockHashChannelManagerZ = crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>;
873 pub static C2Tuple_BlockHashChannelManagerZ_free: extern "C" fn(C2Tuple_BlockHashChannelManagerZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>;
875 pub extern "C" fn C2Tuple_BlockHashChannelManagerZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::ln::channelmanager::ChannelManager) -> C2Tuple_BlockHashChannelManagerZ {
876 C2Tuple_BlockHashChannelManagerZ { a, b, }
880 pub union CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr {
881 pub result: *mut crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>,
882 pub err: *mut crate::ln::msgs::DecodeError,
885 pub struct CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
886 pub contents: CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr,
890 pub extern "C" fn CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>) -> CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
891 CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
892 contents: CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr {
893 result: Box::into_raw(Box::new(o)),
899 pub extern "C" fn CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
900 CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
901 contents: CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr {
902 err: Box::into_raw(Box::new(e)),
908 pub extern "C" fn CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ) { }
909 impl Drop for CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
912 if unsafe { !(self.contents.result as *mut ()).is_null() } {
913 let _ = unsafe { Box::from_raw(self.contents.result) };
916 if unsafe { !(self.contents.err as *mut ()).is_null() } {
917 let _ = unsafe { Box::from_raw(self.contents.err) };
922 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 {
923 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 {
924 let contents = if o.result_ok {
925 let result = unsafe { o.contents.result };
926 unsafe { o.contents.result = std::ptr::null_mut() };
927 CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr { result }
929 let err = unsafe { o.contents.err };
930 unsafe { o.contents.err = std::ptr::null_mut(); }
931 CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr { err }
935 result_ok: o.result_ok,
940 pub union CResult_NetAddressu8ZPtr {
941 pub result: *mut crate::ln::msgs::NetAddress,
945 pub struct CResult_NetAddressu8Z {
946 pub contents: CResult_NetAddressu8ZPtr,
950 pub extern "C" fn CResult_NetAddressu8Z_ok(o: crate::ln::msgs::NetAddress) -> CResult_NetAddressu8Z {
951 CResult_NetAddressu8Z {
952 contents: CResult_NetAddressu8ZPtr {
953 result: Box::into_raw(Box::new(o)),
959 pub extern "C" fn CResult_NetAddressu8Z_err(e: u8) -> CResult_NetAddressu8Z {
960 CResult_NetAddressu8Z {
961 contents: CResult_NetAddressu8ZPtr {
962 err: Box::into_raw(Box::new(e)),
968 pub extern "C" fn CResult_NetAddressu8Z_free(_res: CResult_NetAddressu8Z) { }
969 impl Drop for CResult_NetAddressu8Z {
972 if unsafe { !(self.contents.result as *mut ()).is_null() } {
973 let _ = unsafe { Box::from_raw(self.contents.result) };
976 if unsafe { !(self.contents.err as *mut ()).is_null() } {
977 let _ = unsafe { Box::from_raw(self.contents.err) };
982 impl From<crate::c_types::CResultTempl<crate::ln::msgs::NetAddress, u8>> for CResult_NetAddressu8Z {
983 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::NetAddress, u8>) -> Self {
984 let contents = if o.result_ok {
985 let result = unsafe { o.contents.result };
986 unsafe { o.contents.result = std::ptr::null_mut() };
987 CResult_NetAddressu8ZPtr { result }
989 let err = unsafe { o.contents.err };
990 unsafe { o.contents.err = std::ptr::null_mut(); }
991 CResult_NetAddressu8ZPtr { err }
995 result_ok: o.result_ok,
1000 pub union CResult_CResult_NetAddressu8ZDecodeErrorZPtr {
1001 pub result: *mut crate::c_types::derived::CResult_NetAddressu8Z,
1002 pub err: *mut crate::ln::msgs::DecodeError,
1005 pub struct CResult_CResult_NetAddressu8ZDecodeErrorZ {
1006 pub contents: CResult_CResult_NetAddressu8ZDecodeErrorZPtr,
1007 pub result_ok: bool,
1010 pub extern "C" fn CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: crate::c_types::derived::CResult_NetAddressu8Z) -> CResult_CResult_NetAddressu8ZDecodeErrorZ {
1011 CResult_CResult_NetAddressu8ZDecodeErrorZ {
1012 contents: CResult_CResult_NetAddressu8ZDecodeErrorZPtr {
1013 result: Box::into_raw(Box::new(o)),
1019 pub extern "C" fn CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_CResult_NetAddressu8ZDecodeErrorZ {
1020 CResult_CResult_NetAddressu8ZDecodeErrorZ {
1021 contents: CResult_CResult_NetAddressu8ZDecodeErrorZPtr {
1022 err: Box::into_raw(Box::new(e)),
1028 pub extern "C" fn CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: CResult_CResult_NetAddressu8ZDecodeErrorZ) { }
1029 impl Drop for CResult_CResult_NetAddressu8ZDecodeErrorZ {
1030 fn drop(&mut self) {
1032 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1033 let _ = unsafe { Box::from_raw(self.contents.result) };
1036 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1037 let _ = unsafe { Box::from_raw(self.contents.err) };
1042 impl From<crate::c_types::CResultTempl<crate::c_types::derived::CResult_NetAddressu8Z, crate::ln::msgs::DecodeError>> for CResult_CResult_NetAddressu8ZDecodeErrorZ {
1043 fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CResult_NetAddressu8Z, crate::ln::msgs::DecodeError>) -> Self {
1044 let contents = if o.result_ok {
1045 let result = unsafe { o.contents.result };
1046 unsafe { o.contents.result = std::ptr::null_mut() };
1047 CResult_CResult_NetAddressu8ZDecodeErrorZPtr { result }
1049 let err = unsafe { o.contents.err };
1050 unsafe { o.contents.err = std::ptr::null_mut(); }
1051 CResult_CResult_NetAddressu8ZDecodeErrorZPtr { err }
1055 result_ok: o.result_ok,
1059 pub type CVec_u64Z = crate::c_types::CVecTempl<u64>;
1061 pub static CVec_u64Z_free: extern "C" fn(CVec_u64Z) = crate::c_types::CVecTempl_free::<u64>;
1063 pub type CVec_UpdateAddHTLCZ = crate::c_types::CVecTempl<crate::ln::msgs::UpdateAddHTLC>;
1065 pub static CVec_UpdateAddHTLCZ_free: extern "C" fn(CVec_UpdateAddHTLCZ) = crate::c_types::CVecTempl_free::<crate::ln::msgs::UpdateAddHTLC>;
1067 pub type CVec_UpdateFulfillHTLCZ = crate::c_types::CVecTempl<crate::ln::msgs::UpdateFulfillHTLC>;
1069 pub static CVec_UpdateFulfillHTLCZ_free: extern "C" fn(CVec_UpdateFulfillHTLCZ) = crate::c_types::CVecTempl_free::<crate::ln::msgs::UpdateFulfillHTLC>;
1071 pub type CVec_UpdateFailHTLCZ = crate::c_types::CVecTempl<crate::ln::msgs::UpdateFailHTLC>;
1073 pub static CVec_UpdateFailHTLCZ_free: extern "C" fn(CVec_UpdateFailHTLCZ) = crate::c_types::CVecTempl_free::<crate::ln::msgs::UpdateFailHTLC>;
1075 pub type CVec_UpdateFailMalformedHTLCZ = crate::c_types::CVecTempl<crate::ln::msgs::UpdateFailMalformedHTLC>;
1077 pub static CVec_UpdateFailMalformedHTLCZ_free: extern "C" fn(CVec_UpdateFailMalformedHTLCZ) = crate::c_types::CVecTempl_free::<crate::ln::msgs::UpdateFailMalformedHTLC>;
1080 pub union CResult_boolLightningErrorZPtr {
1081 pub result: *mut bool,
1082 pub err: *mut crate::ln::msgs::LightningError,
1085 pub struct CResult_boolLightningErrorZ {
1086 pub contents: CResult_boolLightningErrorZPtr,
1087 pub result_ok: bool,
1090 pub extern "C" fn CResult_boolLightningErrorZ_ok(o: bool) -> CResult_boolLightningErrorZ {
1091 CResult_boolLightningErrorZ {
1092 contents: CResult_boolLightningErrorZPtr {
1093 result: Box::into_raw(Box::new(o)),
1099 pub extern "C" fn CResult_boolLightningErrorZ_err(e: crate::ln::msgs::LightningError) -> CResult_boolLightningErrorZ {
1100 CResult_boolLightningErrorZ {
1101 contents: CResult_boolLightningErrorZPtr {
1102 err: Box::into_raw(Box::new(e)),
1108 pub extern "C" fn CResult_boolLightningErrorZ_free(_res: CResult_boolLightningErrorZ) { }
1109 impl Drop for CResult_boolLightningErrorZ {
1110 fn drop(&mut self) {
1112 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1113 let _ = unsafe { Box::from_raw(self.contents.result) };
1116 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1117 let _ = unsafe { Box::from_raw(self.contents.err) };
1122 impl From<crate::c_types::CResultTempl<bool, crate::ln::msgs::LightningError>> for CResult_boolLightningErrorZ {
1123 fn from(mut o: crate::c_types::CResultTempl<bool, crate::ln::msgs::LightningError>) -> Self {
1124 let contents = if o.result_ok {
1125 let result = unsafe { o.contents.result };
1126 unsafe { o.contents.result = std::ptr::null_mut() };
1127 CResult_boolLightningErrorZPtr { result }
1129 let err = unsafe { o.contents.err };
1130 unsafe { o.contents.err = std::ptr::null_mut(); }
1131 CResult_boolLightningErrorZPtr { err }
1135 result_ok: o.result_ok,
1139 pub type C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ = crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>;
1141 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>;
1143 pub extern "C" fn C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: crate::ln::msgs::ChannelAnnouncement, b: crate::ln::msgs::ChannelUpdate, c: crate::ln::msgs::ChannelUpdate) -> C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
1144 C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { a, b, c, }
1147 pub type CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ = crate::c_types::CVecTempl<crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>>;
1149 pub static CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free: extern "C" fn(CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ) = crate::c_types::CVecTempl_free::<crate::c_types::C3TupleTempl<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>>;
1151 pub type CVec_NodeAnnouncementZ = crate::c_types::CVecTempl<crate::ln::msgs::NodeAnnouncement>;
1153 pub static CVec_NodeAnnouncementZ_free: extern "C" fn(CVec_NodeAnnouncementZ) = crate::c_types::CVecTempl_free::<crate::ln::msgs::NodeAnnouncement>;
1156 pub union CResult_NoneLightningErrorZPtr {
1157 /// Note that this value is always NULL, as there are no contents in the OK variant
1158 pub result: *mut std::ffi::c_void,
1159 pub err: *mut crate::ln::msgs::LightningError,
1162 pub struct CResult_NoneLightningErrorZ {
1163 pub contents: CResult_NoneLightningErrorZPtr,
1164 pub result_ok: bool,
1167 pub extern "C" fn CResult_NoneLightningErrorZ_ok() -> CResult_NoneLightningErrorZ {
1168 CResult_NoneLightningErrorZ {
1169 contents: CResult_NoneLightningErrorZPtr {
1170 result: std::ptr::null_mut(),
1176 pub extern "C" fn CResult_NoneLightningErrorZ_err(e: crate::ln::msgs::LightningError) -> CResult_NoneLightningErrorZ {
1177 CResult_NoneLightningErrorZ {
1178 contents: CResult_NoneLightningErrorZPtr {
1179 err: Box::into_raw(Box::new(e)),
1185 pub extern "C" fn CResult_NoneLightningErrorZ_free(_res: CResult_NoneLightningErrorZ) { }
1186 impl Drop for CResult_NoneLightningErrorZ {
1187 fn drop(&mut self) {
1190 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1191 let _ = unsafe { Box::from_raw(self.contents.err) };
1196 impl From<crate::c_types::CResultTempl<u8, crate::ln::msgs::LightningError>> for CResult_NoneLightningErrorZ {
1197 fn from(mut o: crate::c_types::CResultTempl<u8, crate::ln::msgs::LightningError>) -> Self {
1198 let contents = if o.result_ok {
1199 let _ = unsafe { Box::from_raw(o.contents.result) };
1200 o.contents.result = std::ptr::null_mut();
1201 CResult_NoneLightningErrorZPtr { result: std::ptr::null_mut() }
1203 let err = unsafe { o.contents.err };
1204 unsafe { o.contents.err = std::ptr::null_mut(); }
1205 CResult_NoneLightningErrorZPtr { err }
1209 result_ok: o.result_ok,
1214 pub union CResult_ChannelReestablishDecodeErrorZPtr {
1215 pub result: *mut crate::ln::msgs::ChannelReestablish,
1216 pub err: *mut crate::ln::msgs::DecodeError,
1219 pub struct CResult_ChannelReestablishDecodeErrorZ {
1220 pub contents: CResult_ChannelReestablishDecodeErrorZPtr,
1221 pub result_ok: bool,
1224 pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_ok(o: crate::ln::msgs::ChannelReestablish) -> CResult_ChannelReestablishDecodeErrorZ {
1225 CResult_ChannelReestablishDecodeErrorZ {
1226 contents: CResult_ChannelReestablishDecodeErrorZPtr {
1227 result: Box::into_raw(Box::new(o)),
1233 pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_ChannelReestablishDecodeErrorZ {
1234 CResult_ChannelReestablishDecodeErrorZ {
1235 contents: CResult_ChannelReestablishDecodeErrorZPtr {
1236 err: Box::into_raw(Box::new(e)),
1242 pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_free(_res: CResult_ChannelReestablishDecodeErrorZ) { }
1243 impl Drop for CResult_ChannelReestablishDecodeErrorZ {
1244 fn drop(&mut self) {
1246 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1247 let _ = unsafe { Box::from_raw(self.contents.result) };
1250 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1251 let _ = unsafe { Box::from_raw(self.contents.err) };
1256 impl From<crate::c_types::CResultTempl<crate::ln::msgs::ChannelReestablish, crate::ln::msgs::DecodeError>> for CResult_ChannelReestablishDecodeErrorZ {
1257 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::ChannelReestablish, crate::ln::msgs::DecodeError>) -> Self {
1258 let contents = if o.result_ok {
1259 let result = unsafe { o.contents.result };
1260 unsafe { o.contents.result = std::ptr::null_mut() };
1261 CResult_ChannelReestablishDecodeErrorZPtr { result }
1263 let err = unsafe { o.contents.err };
1264 unsafe { o.contents.err = std::ptr::null_mut(); }
1265 CResult_ChannelReestablishDecodeErrorZPtr { err }
1269 result_ok: o.result_ok,
1274 pub union CResult_InitDecodeErrorZPtr {
1275 pub result: *mut crate::ln::msgs::Init,
1276 pub err: *mut crate::ln::msgs::DecodeError,
1279 pub struct CResult_InitDecodeErrorZ {
1280 pub contents: CResult_InitDecodeErrorZPtr,
1281 pub result_ok: bool,
1284 pub extern "C" fn CResult_InitDecodeErrorZ_ok(o: crate::ln::msgs::Init) -> CResult_InitDecodeErrorZ {
1285 CResult_InitDecodeErrorZ {
1286 contents: CResult_InitDecodeErrorZPtr {
1287 result: Box::into_raw(Box::new(o)),
1293 pub extern "C" fn CResult_InitDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_InitDecodeErrorZ {
1294 CResult_InitDecodeErrorZ {
1295 contents: CResult_InitDecodeErrorZPtr {
1296 err: Box::into_raw(Box::new(e)),
1302 pub extern "C" fn CResult_InitDecodeErrorZ_free(_res: CResult_InitDecodeErrorZ) { }
1303 impl Drop for CResult_InitDecodeErrorZ {
1304 fn drop(&mut self) {
1306 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1307 let _ = unsafe { Box::from_raw(self.contents.result) };
1310 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1311 let _ = unsafe { Box::from_raw(self.contents.err) };
1316 impl From<crate::c_types::CResultTempl<crate::ln::msgs::Init, crate::ln::msgs::DecodeError>> for CResult_InitDecodeErrorZ {
1317 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::Init, crate::ln::msgs::DecodeError>) -> Self {
1318 let contents = if o.result_ok {
1319 let result = unsafe { o.contents.result };
1320 unsafe { o.contents.result = std::ptr::null_mut() };
1321 CResult_InitDecodeErrorZPtr { result }
1323 let err = unsafe { o.contents.err };
1324 unsafe { o.contents.err = std::ptr::null_mut(); }
1325 CResult_InitDecodeErrorZPtr { err }
1329 result_ok: o.result_ok,
1334 pub union CResult_PingDecodeErrorZPtr {
1335 pub result: *mut crate::ln::msgs::Ping,
1336 pub err: *mut crate::ln::msgs::DecodeError,
1339 pub struct CResult_PingDecodeErrorZ {
1340 pub contents: CResult_PingDecodeErrorZPtr,
1341 pub result_ok: bool,
1344 pub extern "C" fn CResult_PingDecodeErrorZ_ok(o: crate::ln::msgs::Ping) -> CResult_PingDecodeErrorZ {
1345 CResult_PingDecodeErrorZ {
1346 contents: CResult_PingDecodeErrorZPtr {
1347 result: Box::into_raw(Box::new(o)),
1353 pub extern "C" fn CResult_PingDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_PingDecodeErrorZ {
1354 CResult_PingDecodeErrorZ {
1355 contents: CResult_PingDecodeErrorZPtr {
1356 err: Box::into_raw(Box::new(e)),
1362 pub extern "C" fn CResult_PingDecodeErrorZ_free(_res: CResult_PingDecodeErrorZ) { }
1363 impl Drop for CResult_PingDecodeErrorZ {
1364 fn drop(&mut self) {
1366 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1367 let _ = unsafe { Box::from_raw(self.contents.result) };
1370 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1371 let _ = unsafe { Box::from_raw(self.contents.err) };
1376 impl From<crate::c_types::CResultTempl<crate::ln::msgs::Ping, crate::ln::msgs::DecodeError>> for CResult_PingDecodeErrorZ {
1377 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::Ping, crate::ln::msgs::DecodeError>) -> Self {
1378 let contents = if o.result_ok {
1379 let result = unsafe { o.contents.result };
1380 unsafe { o.contents.result = std::ptr::null_mut() };
1381 CResult_PingDecodeErrorZPtr { result }
1383 let err = unsafe { o.contents.err };
1384 unsafe { o.contents.err = std::ptr::null_mut(); }
1385 CResult_PingDecodeErrorZPtr { err }
1389 result_ok: o.result_ok,
1394 pub union CResult_PongDecodeErrorZPtr {
1395 pub result: *mut crate::ln::msgs::Pong,
1396 pub err: *mut crate::ln::msgs::DecodeError,
1399 pub struct CResult_PongDecodeErrorZ {
1400 pub contents: CResult_PongDecodeErrorZPtr,
1401 pub result_ok: bool,
1404 pub extern "C" fn CResult_PongDecodeErrorZ_ok(o: crate::ln::msgs::Pong) -> CResult_PongDecodeErrorZ {
1405 CResult_PongDecodeErrorZ {
1406 contents: CResult_PongDecodeErrorZPtr {
1407 result: Box::into_raw(Box::new(o)),
1413 pub extern "C" fn CResult_PongDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_PongDecodeErrorZ {
1414 CResult_PongDecodeErrorZ {
1415 contents: CResult_PongDecodeErrorZPtr {
1416 err: Box::into_raw(Box::new(e)),
1422 pub extern "C" fn CResult_PongDecodeErrorZ_free(_res: CResult_PongDecodeErrorZ) { }
1423 impl Drop for CResult_PongDecodeErrorZ {
1424 fn drop(&mut self) {
1426 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1427 let _ = unsafe { Box::from_raw(self.contents.result) };
1430 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1431 let _ = unsafe { Box::from_raw(self.contents.err) };
1436 impl From<crate::c_types::CResultTempl<crate::ln::msgs::Pong, crate::ln::msgs::DecodeError>> for CResult_PongDecodeErrorZ {
1437 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::Pong, crate::ln::msgs::DecodeError>) -> Self {
1438 let contents = if o.result_ok {
1439 let result = unsafe { o.contents.result };
1440 unsafe { o.contents.result = std::ptr::null_mut() };
1441 CResult_PongDecodeErrorZPtr { result }
1443 let err = unsafe { o.contents.err };
1444 unsafe { o.contents.err = std::ptr::null_mut(); }
1445 CResult_PongDecodeErrorZPtr { err }
1449 result_ok: o.result_ok,
1454 pub union CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
1455 pub result: *mut crate::ln::msgs::UnsignedChannelAnnouncement,
1456 pub err: *mut crate::ln::msgs::DecodeError,
1459 pub struct CResult_UnsignedChannelAnnouncementDecodeErrorZ {
1460 pub contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr,
1461 pub result_ok: bool,
1464 pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: crate::ln::msgs::UnsignedChannelAnnouncement) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ {
1465 CResult_UnsignedChannelAnnouncementDecodeErrorZ {
1466 contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
1467 result: Box::into_raw(Box::new(o)),
1473 pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ {
1474 CResult_UnsignedChannelAnnouncementDecodeErrorZ {
1475 contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
1476 err: Box::into_raw(Box::new(e)),
1482 pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: CResult_UnsignedChannelAnnouncementDecodeErrorZ) { }
1483 impl Drop for CResult_UnsignedChannelAnnouncementDecodeErrorZ {
1484 fn drop(&mut self) {
1486 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1487 let _ = unsafe { Box::from_raw(self.contents.result) };
1490 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1491 let _ = unsafe { Box::from_raw(self.contents.err) };
1496 impl From<crate::c_types::CResultTempl<crate::ln::msgs::UnsignedChannelAnnouncement, crate::ln::msgs::DecodeError>> for CResult_UnsignedChannelAnnouncementDecodeErrorZ {
1497 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::UnsignedChannelAnnouncement, crate::ln::msgs::DecodeError>) -> Self {
1498 let contents = if o.result_ok {
1499 let result = unsafe { o.contents.result };
1500 unsafe { o.contents.result = std::ptr::null_mut() };
1501 CResult_UnsignedChannelAnnouncementDecodeErrorZPtr { result }
1503 let err = unsafe { o.contents.err };
1504 unsafe { o.contents.err = std::ptr::null_mut(); }
1505 CResult_UnsignedChannelAnnouncementDecodeErrorZPtr { err }
1509 result_ok: o.result_ok,
1514 pub union CResult_UnsignedChannelUpdateDecodeErrorZPtr {
1515 pub result: *mut crate::ln::msgs::UnsignedChannelUpdate,
1516 pub err: *mut crate::ln::msgs::DecodeError,
1519 pub struct CResult_UnsignedChannelUpdateDecodeErrorZ {
1520 pub contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr,
1521 pub result_ok: bool,
1524 pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: crate::ln::msgs::UnsignedChannelUpdate) -> CResult_UnsignedChannelUpdateDecodeErrorZ {
1525 CResult_UnsignedChannelUpdateDecodeErrorZ {
1526 contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
1527 result: Box::into_raw(Box::new(o)),
1533 pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_UnsignedChannelUpdateDecodeErrorZ {
1534 CResult_UnsignedChannelUpdateDecodeErrorZ {
1535 contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
1536 err: Box::into_raw(Box::new(e)),
1542 pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: CResult_UnsignedChannelUpdateDecodeErrorZ) { }
1543 impl Drop for CResult_UnsignedChannelUpdateDecodeErrorZ {
1544 fn drop(&mut self) {
1546 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1547 let _ = unsafe { Box::from_raw(self.contents.result) };
1550 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1551 let _ = unsafe { Box::from_raw(self.contents.err) };
1556 impl From<crate::c_types::CResultTempl<crate::ln::msgs::UnsignedChannelUpdate, crate::ln::msgs::DecodeError>> for CResult_UnsignedChannelUpdateDecodeErrorZ {
1557 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::UnsignedChannelUpdate, crate::ln::msgs::DecodeError>) -> Self {
1558 let contents = if o.result_ok {
1559 let result = unsafe { o.contents.result };
1560 unsafe { o.contents.result = std::ptr::null_mut() };
1561 CResult_UnsignedChannelUpdateDecodeErrorZPtr { result }
1563 let err = unsafe { o.contents.err };
1564 unsafe { o.contents.err = std::ptr::null_mut(); }
1565 CResult_UnsignedChannelUpdateDecodeErrorZPtr { err }
1569 result_ok: o.result_ok,
1574 pub union CResult_ErrorMessageDecodeErrorZPtr {
1575 pub result: *mut crate::ln::msgs::ErrorMessage,
1576 pub err: *mut crate::ln::msgs::DecodeError,
1579 pub struct CResult_ErrorMessageDecodeErrorZ {
1580 pub contents: CResult_ErrorMessageDecodeErrorZPtr,
1581 pub result_ok: bool,
1584 pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_ok(o: crate::ln::msgs::ErrorMessage) -> CResult_ErrorMessageDecodeErrorZ {
1585 CResult_ErrorMessageDecodeErrorZ {
1586 contents: CResult_ErrorMessageDecodeErrorZPtr {
1587 result: Box::into_raw(Box::new(o)),
1593 pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_ErrorMessageDecodeErrorZ {
1594 CResult_ErrorMessageDecodeErrorZ {
1595 contents: CResult_ErrorMessageDecodeErrorZPtr {
1596 err: Box::into_raw(Box::new(e)),
1602 pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_free(_res: CResult_ErrorMessageDecodeErrorZ) { }
1603 impl Drop for CResult_ErrorMessageDecodeErrorZ {
1604 fn drop(&mut self) {
1606 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1607 let _ = unsafe { Box::from_raw(self.contents.result) };
1610 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1611 let _ = unsafe { Box::from_raw(self.contents.err) };
1616 impl From<crate::c_types::CResultTempl<crate::ln::msgs::ErrorMessage, crate::ln::msgs::DecodeError>> for CResult_ErrorMessageDecodeErrorZ {
1617 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::ErrorMessage, crate::ln::msgs::DecodeError>) -> Self {
1618 let contents = if o.result_ok {
1619 let result = unsafe { o.contents.result };
1620 unsafe { o.contents.result = std::ptr::null_mut() };
1621 CResult_ErrorMessageDecodeErrorZPtr { result }
1623 let err = unsafe { o.contents.err };
1624 unsafe { o.contents.err = std::ptr::null_mut(); }
1625 CResult_ErrorMessageDecodeErrorZPtr { err }
1629 result_ok: o.result_ok,
1634 pub union CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
1635 pub result: *mut crate::ln::msgs::UnsignedNodeAnnouncement,
1636 pub err: *mut crate::ln::msgs::DecodeError,
1639 pub struct CResult_UnsignedNodeAnnouncementDecodeErrorZ {
1640 pub contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr,
1641 pub result_ok: bool,
1644 pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: crate::ln::msgs::UnsignedNodeAnnouncement) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ {
1645 CResult_UnsignedNodeAnnouncementDecodeErrorZ {
1646 contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
1647 result: Box::into_raw(Box::new(o)),
1653 pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ {
1654 CResult_UnsignedNodeAnnouncementDecodeErrorZ {
1655 contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
1656 err: Box::into_raw(Box::new(e)),
1662 pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: CResult_UnsignedNodeAnnouncementDecodeErrorZ) { }
1663 impl Drop for CResult_UnsignedNodeAnnouncementDecodeErrorZ {
1664 fn drop(&mut self) {
1666 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1667 let _ = unsafe { Box::from_raw(self.contents.result) };
1670 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1671 let _ = unsafe { Box::from_raw(self.contents.err) };
1676 impl From<crate::c_types::CResultTempl<crate::ln::msgs::UnsignedNodeAnnouncement, crate::ln::msgs::DecodeError>> for CResult_UnsignedNodeAnnouncementDecodeErrorZ {
1677 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::UnsignedNodeAnnouncement, crate::ln::msgs::DecodeError>) -> Self {
1678 let contents = if o.result_ok {
1679 let result = unsafe { o.contents.result };
1680 unsafe { o.contents.result = std::ptr::null_mut() };
1681 CResult_UnsignedNodeAnnouncementDecodeErrorZPtr { result }
1683 let err = unsafe { o.contents.err };
1684 unsafe { o.contents.err = std::ptr::null_mut(); }
1685 CResult_UnsignedNodeAnnouncementDecodeErrorZPtr { err }
1689 result_ok: o.result_ok,
1694 pub union CResult_QueryShortChannelIdsDecodeErrorZPtr {
1695 pub result: *mut crate::ln::msgs::QueryShortChannelIds,
1696 pub err: *mut crate::ln::msgs::DecodeError,
1699 pub struct CResult_QueryShortChannelIdsDecodeErrorZ {
1700 pub contents: CResult_QueryShortChannelIdsDecodeErrorZPtr,
1701 pub result_ok: bool,
1704 pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: crate::ln::msgs::QueryShortChannelIds) -> CResult_QueryShortChannelIdsDecodeErrorZ {
1705 CResult_QueryShortChannelIdsDecodeErrorZ {
1706 contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
1707 result: Box::into_raw(Box::new(o)),
1713 pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_QueryShortChannelIdsDecodeErrorZ {
1714 CResult_QueryShortChannelIdsDecodeErrorZ {
1715 contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
1716 err: Box::into_raw(Box::new(e)),
1722 pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: CResult_QueryShortChannelIdsDecodeErrorZ) { }
1723 impl Drop for CResult_QueryShortChannelIdsDecodeErrorZ {
1724 fn drop(&mut self) {
1726 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1727 let _ = unsafe { Box::from_raw(self.contents.result) };
1730 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1731 let _ = unsafe { Box::from_raw(self.contents.err) };
1736 impl From<crate::c_types::CResultTempl<crate::ln::msgs::QueryShortChannelIds, crate::ln::msgs::DecodeError>> for CResult_QueryShortChannelIdsDecodeErrorZ {
1737 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::QueryShortChannelIds, crate::ln::msgs::DecodeError>) -> Self {
1738 let contents = if o.result_ok {
1739 let result = unsafe { o.contents.result };
1740 unsafe { o.contents.result = std::ptr::null_mut() };
1741 CResult_QueryShortChannelIdsDecodeErrorZPtr { result }
1743 let err = unsafe { o.contents.err };
1744 unsafe { o.contents.err = std::ptr::null_mut(); }
1745 CResult_QueryShortChannelIdsDecodeErrorZPtr { err }
1749 result_ok: o.result_ok,
1754 pub union CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
1755 pub result: *mut crate::ln::msgs::ReplyShortChannelIdsEnd,
1756 pub err: *mut crate::ln::msgs::DecodeError,
1759 pub struct CResult_ReplyShortChannelIdsEndDecodeErrorZ {
1760 pub contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr,
1761 pub result_ok: bool,
1764 pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: crate::ln::msgs::ReplyShortChannelIdsEnd) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ {
1765 CResult_ReplyShortChannelIdsEndDecodeErrorZ {
1766 contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
1767 result: Box::into_raw(Box::new(o)),
1773 pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ {
1774 CResult_ReplyShortChannelIdsEndDecodeErrorZ {
1775 contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
1776 err: Box::into_raw(Box::new(e)),
1782 pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: CResult_ReplyShortChannelIdsEndDecodeErrorZ) { }
1783 impl Drop for CResult_ReplyShortChannelIdsEndDecodeErrorZ {
1784 fn drop(&mut self) {
1786 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1787 let _ = unsafe { Box::from_raw(self.contents.result) };
1790 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1791 let _ = unsafe { Box::from_raw(self.contents.err) };
1796 impl From<crate::c_types::CResultTempl<crate::ln::msgs::ReplyShortChannelIdsEnd, crate::ln::msgs::DecodeError>> for CResult_ReplyShortChannelIdsEndDecodeErrorZ {
1797 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::ReplyShortChannelIdsEnd, crate::ln::msgs::DecodeError>) -> Self {
1798 let contents = if o.result_ok {
1799 let result = unsafe { o.contents.result };
1800 unsafe { o.contents.result = std::ptr::null_mut() };
1801 CResult_ReplyShortChannelIdsEndDecodeErrorZPtr { result }
1803 let err = unsafe { o.contents.err };
1804 unsafe { o.contents.err = std::ptr::null_mut(); }
1805 CResult_ReplyShortChannelIdsEndDecodeErrorZPtr { err }
1809 result_ok: o.result_ok,
1814 pub union CResult_QueryChannelRangeDecodeErrorZPtr {
1815 pub result: *mut crate::ln::msgs::QueryChannelRange,
1816 pub err: *mut crate::ln::msgs::DecodeError,
1819 pub struct CResult_QueryChannelRangeDecodeErrorZ {
1820 pub contents: CResult_QueryChannelRangeDecodeErrorZPtr,
1821 pub result_ok: bool,
1824 pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_ok(o: crate::ln::msgs::QueryChannelRange) -> CResult_QueryChannelRangeDecodeErrorZ {
1825 CResult_QueryChannelRangeDecodeErrorZ {
1826 contents: CResult_QueryChannelRangeDecodeErrorZPtr {
1827 result: Box::into_raw(Box::new(o)),
1833 pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_QueryChannelRangeDecodeErrorZ {
1834 CResult_QueryChannelRangeDecodeErrorZ {
1835 contents: CResult_QueryChannelRangeDecodeErrorZPtr {
1836 err: Box::into_raw(Box::new(e)),
1842 pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_free(_res: CResult_QueryChannelRangeDecodeErrorZ) { }
1843 impl Drop for CResult_QueryChannelRangeDecodeErrorZ {
1844 fn drop(&mut self) {
1846 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1847 let _ = unsafe { Box::from_raw(self.contents.result) };
1850 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1851 let _ = unsafe { Box::from_raw(self.contents.err) };
1856 impl From<crate::c_types::CResultTempl<crate::ln::msgs::QueryChannelRange, crate::ln::msgs::DecodeError>> for CResult_QueryChannelRangeDecodeErrorZ {
1857 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::QueryChannelRange, crate::ln::msgs::DecodeError>) -> Self {
1858 let contents = if o.result_ok {
1859 let result = unsafe { o.contents.result };
1860 unsafe { o.contents.result = std::ptr::null_mut() };
1861 CResult_QueryChannelRangeDecodeErrorZPtr { result }
1863 let err = unsafe { o.contents.err };
1864 unsafe { o.contents.err = std::ptr::null_mut(); }
1865 CResult_QueryChannelRangeDecodeErrorZPtr { err }
1869 result_ok: o.result_ok,
1874 pub union CResult_ReplyChannelRangeDecodeErrorZPtr {
1875 pub result: *mut crate::ln::msgs::ReplyChannelRange,
1876 pub err: *mut crate::ln::msgs::DecodeError,
1879 pub struct CResult_ReplyChannelRangeDecodeErrorZ {
1880 pub contents: CResult_ReplyChannelRangeDecodeErrorZPtr,
1881 pub result_ok: bool,
1884 pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_ok(o: crate::ln::msgs::ReplyChannelRange) -> CResult_ReplyChannelRangeDecodeErrorZ {
1885 CResult_ReplyChannelRangeDecodeErrorZ {
1886 contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
1887 result: Box::into_raw(Box::new(o)),
1893 pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_ReplyChannelRangeDecodeErrorZ {
1894 CResult_ReplyChannelRangeDecodeErrorZ {
1895 contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
1896 err: Box::into_raw(Box::new(e)),
1902 pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_free(_res: CResult_ReplyChannelRangeDecodeErrorZ) { }
1903 impl Drop for CResult_ReplyChannelRangeDecodeErrorZ {
1904 fn drop(&mut self) {
1906 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1907 let _ = unsafe { Box::from_raw(self.contents.result) };
1910 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1911 let _ = unsafe { Box::from_raw(self.contents.err) };
1916 impl From<crate::c_types::CResultTempl<crate::ln::msgs::ReplyChannelRange, crate::ln::msgs::DecodeError>> for CResult_ReplyChannelRangeDecodeErrorZ {
1917 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::ReplyChannelRange, crate::ln::msgs::DecodeError>) -> Self {
1918 let contents = if o.result_ok {
1919 let result = unsafe { o.contents.result };
1920 unsafe { o.contents.result = std::ptr::null_mut() };
1921 CResult_ReplyChannelRangeDecodeErrorZPtr { result }
1923 let err = unsafe { o.contents.err };
1924 unsafe { o.contents.err = std::ptr::null_mut(); }
1925 CResult_ReplyChannelRangeDecodeErrorZPtr { err }
1929 result_ok: o.result_ok,
1934 pub union CResult_GossipTimestampFilterDecodeErrorZPtr {
1935 pub result: *mut crate::ln::msgs::GossipTimestampFilter,
1936 pub err: *mut crate::ln::msgs::DecodeError,
1939 pub struct CResult_GossipTimestampFilterDecodeErrorZ {
1940 pub contents: CResult_GossipTimestampFilterDecodeErrorZPtr,
1941 pub result_ok: bool,
1944 pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_ok(o: crate::ln::msgs::GossipTimestampFilter) -> CResult_GossipTimestampFilterDecodeErrorZ {
1945 CResult_GossipTimestampFilterDecodeErrorZ {
1946 contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
1947 result: Box::into_raw(Box::new(o)),
1953 pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_GossipTimestampFilterDecodeErrorZ {
1954 CResult_GossipTimestampFilterDecodeErrorZ {
1955 contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
1956 err: Box::into_raw(Box::new(e)),
1962 pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_free(_res: CResult_GossipTimestampFilterDecodeErrorZ) { }
1963 impl Drop for CResult_GossipTimestampFilterDecodeErrorZ {
1964 fn drop(&mut self) {
1966 if unsafe { !(self.contents.result as *mut ()).is_null() } {
1967 let _ = unsafe { Box::from_raw(self.contents.result) };
1970 if unsafe { !(self.contents.err as *mut ()).is_null() } {
1971 let _ = unsafe { Box::from_raw(self.contents.err) };
1976 impl From<crate::c_types::CResultTempl<crate::ln::msgs::GossipTimestampFilter, crate::ln::msgs::DecodeError>> for CResult_GossipTimestampFilterDecodeErrorZ {
1977 fn from(mut o: crate::c_types::CResultTempl<crate::ln::msgs::GossipTimestampFilter, crate::ln::msgs::DecodeError>) -> Self {
1978 let contents = if o.result_ok {
1979 let result = unsafe { o.contents.result };
1980 unsafe { o.contents.result = std::ptr::null_mut() };
1981 CResult_GossipTimestampFilterDecodeErrorZPtr { result }
1983 let err = unsafe { o.contents.err };
1984 unsafe { o.contents.err = std::ptr::null_mut(); }
1985 CResult_GossipTimestampFilterDecodeErrorZPtr { err }
1989 result_ok: o.result_ok,
1993 pub type CVec_PublicKeyZ = crate::c_types::CVecTempl<crate::c_types::PublicKey>;
1995 pub static CVec_PublicKeyZ_free: extern "C" fn(CVec_PublicKeyZ) = crate::c_types::CVecTempl_free::<crate::c_types::PublicKey>;
1997 pub type CVec_u8Z = crate::c_types::CVecTempl<u8>;
1999 pub static CVec_u8Z_free: extern "C" fn(CVec_u8Z) = crate::c_types::CVecTempl_free::<u8>;
2002 pub union CResult_CVec_u8ZPeerHandleErrorZPtr {
2003 pub result: *mut crate::c_types::CVecTempl<u8>,
2004 pub err: *mut crate::ln::peer_handler::PeerHandleError,
2007 pub struct CResult_CVec_u8ZPeerHandleErrorZ {
2008 pub contents: CResult_CVec_u8ZPeerHandleErrorZPtr,
2009 pub result_ok: bool,
2012 pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_ok(o: crate::c_types::CVecTempl<u8>) -> CResult_CVec_u8ZPeerHandleErrorZ {
2013 CResult_CVec_u8ZPeerHandleErrorZ {
2014 contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
2015 result: Box::into_raw(Box::new(o)),
2021 pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_err(e: crate::ln::peer_handler::PeerHandleError) -> CResult_CVec_u8ZPeerHandleErrorZ {
2022 CResult_CVec_u8ZPeerHandleErrorZ {
2023 contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
2024 err: Box::into_raw(Box::new(e)),
2030 pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_free(_res: CResult_CVec_u8ZPeerHandleErrorZ) { }
2031 impl Drop for CResult_CVec_u8ZPeerHandleErrorZ {
2032 fn drop(&mut self) {
2034 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2035 let _ = unsafe { Box::from_raw(self.contents.result) };
2038 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2039 let _ = unsafe { Box::from_raw(self.contents.err) };
2044 impl From<crate::c_types::CResultTempl<crate::c_types::CVecTempl<u8>, crate::ln::peer_handler::PeerHandleError>> for CResult_CVec_u8ZPeerHandleErrorZ {
2045 fn from(mut o: crate::c_types::CResultTempl<crate::c_types::CVecTempl<u8>, crate::ln::peer_handler::PeerHandleError>) -> Self {
2046 let contents = if o.result_ok {
2047 let result = unsafe { o.contents.result };
2048 unsafe { o.contents.result = std::ptr::null_mut() };
2049 CResult_CVec_u8ZPeerHandleErrorZPtr { result }
2051 let err = unsafe { o.contents.err };
2052 unsafe { o.contents.err = std::ptr::null_mut(); }
2053 CResult_CVec_u8ZPeerHandleErrorZPtr { err }
2057 result_ok: o.result_ok,
2062 pub union CResult_NonePeerHandleErrorZPtr {
2063 /// Note that this value is always NULL, as there are no contents in the OK variant
2064 pub result: *mut std::ffi::c_void,
2065 pub err: *mut crate::ln::peer_handler::PeerHandleError,
2068 pub struct CResult_NonePeerHandleErrorZ {
2069 pub contents: CResult_NonePeerHandleErrorZPtr,
2070 pub result_ok: bool,
2073 pub extern "C" fn CResult_NonePeerHandleErrorZ_ok() -> CResult_NonePeerHandleErrorZ {
2074 CResult_NonePeerHandleErrorZ {
2075 contents: CResult_NonePeerHandleErrorZPtr {
2076 result: std::ptr::null_mut(),
2082 pub extern "C" fn CResult_NonePeerHandleErrorZ_err(e: crate::ln::peer_handler::PeerHandleError) -> CResult_NonePeerHandleErrorZ {
2083 CResult_NonePeerHandleErrorZ {
2084 contents: CResult_NonePeerHandleErrorZPtr {
2085 err: Box::into_raw(Box::new(e)),
2091 pub extern "C" fn CResult_NonePeerHandleErrorZ_free(_res: CResult_NonePeerHandleErrorZ) { }
2092 impl Drop for CResult_NonePeerHandleErrorZ {
2093 fn drop(&mut self) {
2096 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2097 let _ = unsafe { Box::from_raw(self.contents.err) };
2102 impl From<crate::c_types::CResultTempl<u8, crate::ln::peer_handler::PeerHandleError>> for CResult_NonePeerHandleErrorZ {
2103 fn from(mut o: crate::c_types::CResultTempl<u8, crate::ln::peer_handler::PeerHandleError>) -> Self {
2104 let contents = if o.result_ok {
2105 let _ = unsafe { Box::from_raw(o.contents.result) };
2106 o.contents.result = std::ptr::null_mut();
2107 CResult_NonePeerHandleErrorZPtr { result: std::ptr::null_mut() }
2109 let err = unsafe { o.contents.err };
2110 unsafe { o.contents.err = std::ptr::null_mut(); }
2111 CResult_NonePeerHandleErrorZPtr { err }
2115 result_ok: o.result_ok,
2120 pub union CResult_boolPeerHandleErrorZPtr {
2121 pub result: *mut bool,
2122 pub err: *mut crate::ln::peer_handler::PeerHandleError,
2125 pub struct CResult_boolPeerHandleErrorZ {
2126 pub contents: CResult_boolPeerHandleErrorZPtr,
2127 pub result_ok: bool,
2130 pub extern "C" fn CResult_boolPeerHandleErrorZ_ok(o: bool) -> CResult_boolPeerHandleErrorZ {
2131 CResult_boolPeerHandleErrorZ {
2132 contents: CResult_boolPeerHandleErrorZPtr {
2133 result: Box::into_raw(Box::new(o)),
2139 pub extern "C" fn CResult_boolPeerHandleErrorZ_err(e: crate::ln::peer_handler::PeerHandleError) -> CResult_boolPeerHandleErrorZ {
2140 CResult_boolPeerHandleErrorZ {
2141 contents: CResult_boolPeerHandleErrorZPtr {
2142 err: Box::into_raw(Box::new(e)),
2148 pub extern "C" fn CResult_boolPeerHandleErrorZ_free(_res: CResult_boolPeerHandleErrorZ) { }
2149 impl Drop for CResult_boolPeerHandleErrorZ {
2150 fn drop(&mut self) {
2152 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2153 let _ = unsafe { Box::from_raw(self.contents.result) };
2156 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2157 let _ = unsafe { Box::from_raw(self.contents.err) };
2162 impl From<crate::c_types::CResultTempl<bool, crate::ln::peer_handler::PeerHandleError>> for CResult_boolPeerHandleErrorZ {
2163 fn from(mut o: crate::c_types::CResultTempl<bool, crate::ln::peer_handler::PeerHandleError>) -> Self {
2164 let contents = if o.result_ok {
2165 let result = unsafe { o.contents.result };
2166 unsafe { o.contents.result = std::ptr::null_mut() };
2167 CResult_boolPeerHandleErrorZPtr { result }
2169 let err = unsafe { o.contents.err };
2170 unsafe { o.contents.err = std::ptr::null_mut(); }
2171 CResult_boolPeerHandleErrorZPtr { err }
2175 result_ok: o.result_ok,
2180 pub union CResult_SecretKeySecpErrorZPtr {
2181 pub result: *mut crate::c_types::SecretKey,
2182 pub err: *mut crate::c_types::Secp256k1Error,
2185 pub struct CResult_SecretKeySecpErrorZ {
2186 pub contents: CResult_SecretKeySecpErrorZPtr,
2187 pub result_ok: bool,
2190 pub extern "C" fn CResult_SecretKeySecpErrorZ_ok(o: crate::c_types::SecretKey) -> CResult_SecretKeySecpErrorZ {
2191 CResult_SecretKeySecpErrorZ {
2192 contents: CResult_SecretKeySecpErrorZPtr {
2193 result: Box::into_raw(Box::new(o)),
2199 pub extern "C" fn CResult_SecretKeySecpErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_SecretKeySecpErrorZ {
2200 CResult_SecretKeySecpErrorZ {
2201 contents: CResult_SecretKeySecpErrorZPtr {
2202 err: Box::into_raw(Box::new(e)),
2208 pub extern "C" fn CResult_SecretKeySecpErrorZ_free(_res: CResult_SecretKeySecpErrorZ) { }
2209 impl Drop for CResult_SecretKeySecpErrorZ {
2210 fn drop(&mut self) {
2212 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2213 let _ = unsafe { Box::from_raw(self.contents.result) };
2216 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2217 let _ = unsafe { Box::from_raw(self.contents.err) };
2222 impl From<crate::c_types::CResultTempl<crate::c_types::SecretKey, crate::c_types::Secp256k1Error>> for CResult_SecretKeySecpErrorZ {
2223 fn from(mut o: crate::c_types::CResultTempl<crate::c_types::SecretKey, crate::c_types::Secp256k1Error>) -> Self {
2224 let contents = if o.result_ok {
2225 let result = unsafe { o.contents.result };
2226 unsafe { o.contents.result = std::ptr::null_mut() };
2227 CResult_SecretKeySecpErrorZPtr { result }
2229 let err = unsafe { o.contents.err };
2230 unsafe { o.contents.err = std::ptr::null_mut(); }
2231 CResult_SecretKeySecpErrorZPtr { err }
2235 result_ok: o.result_ok,
2240 pub union CResult_PublicKeySecpErrorZPtr {
2241 pub result: *mut crate::c_types::PublicKey,
2242 pub err: *mut crate::c_types::Secp256k1Error,
2245 pub struct CResult_PublicKeySecpErrorZ {
2246 pub contents: CResult_PublicKeySecpErrorZPtr,
2247 pub result_ok: bool,
2250 pub extern "C" fn CResult_PublicKeySecpErrorZ_ok(o: crate::c_types::PublicKey) -> CResult_PublicKeySecpErrorZ {
2251 CResult_PublicKeySecpErrorZ {
2252 contents: CResult_PublicKeySecpErrorZPtr {
2253 result: Box::into_raw(Box::new(o)),
2259 pub extern "C" fn CResult_PublicKeySecpErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_PublicKeySecpErrorZ {
2260 CResult_PublicKeySecpErrorZ {
2261 contents: CResult_PublicKeySecpErrorZPtr {
2262 err: Box::into_raw(Box::new(e)),
2268 pub extern "C" fn CResult_PublicKeySecpErrorZ_free(_res: CResult_PublicKeySecpErrorZ) { }
2269 impl Drop for CResult_PublicKeySecpErrorZ {
2270 fn drop(&mut self) {
2272 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2273 let _ = unsafe { Box::from_raw(self.contents.result) };
2276 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2277 let _ = unsafe { Box::from_raw(self.contents.err) };
2282 impl From<crate::c_types::CResultTempl<crate::c_types::PublicKey, crate::c_types::Secp256k1Error>> for CResult_PublicKeySecpErrorZ {
2283 fn from(mut o: crate::c_types::CResultTempl<crate::c_types::PublicKey, crate::c_types::Secp256k1Error>) -> Self {
2284 let contents = if o.result_ok {
2285 let result = unsafe { o.contents.result };
2286 unsafe { o.contents.result = std::ptr::null_mut() };
2287 CResult_PublicKeySecpErrorZPtr { result }
2289 let err = unsafe { o.contents.err };
2290 unsafe { o.contents.err = std::ptr::null_mut(); }
2291 CResult_PublicKeySecpErrorZPtr { err }
2295 result_ok: o.result_ok,
2300 pub union CResult_TxCreationKeysSecpErrorZPtr {
2301 pub result: *mut crate::ln::chan_utils::TxCreationKeys,
2302 pub err: *mut crate::c_types::Secp256k1Error,
2305 pub struct CResult_TxCreationKeysSecpErrorZ {
2306 pub contents: CResult_TxCreationKeysSecpErrorZPtr,
2307 pub result_ok: bool,
2310 pub extern "C" fn CResult_TxCreationKeysSecpErrorZ_ok(o: crate::ln::chan_utils::TxCreationKeys) -> CResult_TxCreationKeysSecpErrorZ {
2311 CResult_TxCreationKeysSecpErrorZ {
2312 contents: CResult_TxCreationKeysSecpErrorZPtr {
2313 result: Box::into_raw(Box::new(o)),
2319 pub extern "C" fn CResult_TxCreationKeysSecpErrorZ_err(e: crate::c_types::Secp256k1Error) -> CResult_TxCreationKeysSecpErrorZ {
2320 CResult_TxCreationKeysSecpErrorZ {
2321 contents: CResult_TxCreationKeysSecpErrorZPtr {
2322 err: Box::into_raw(Box::new(e)),
2328 pub extern "C" fn CResult_TxCreationKeysSecpErrorZ_free(_res: CResult_TxCreationKeysSecpErrorZ) { }
2329 impl Drop for CResult_TxCreationKeysSecpErrorZ {
2330 fn drop(&mut self) {
2332 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2333 let _ = unsafe { Box::from_raw(self.contents.result) };
2336 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2337 let _ = unsafe { Box::from_raw(self.contents.err) };
2342 impl From<crate::c_types::CResultTempl<crate::ln::chan_utils::TxCreationKeys, crate::c_types::Secp256k1Error>> for CResult_TxCreationKeysSecpErrorZ {
2343 fn from(mut o: crate::c_types::CResultTempl<crate::ln::chan_utils::TxCreationKeys, crate::c_types::Secp256k1Error>) -> Self {
2344 let contents = if o.result_ok {
2345 let result = unsafe { o.contents.result };
2346 unsafe { o.contents.result = std::ptr::null_mut() };
2347 CResult_TxCreationKeysSecpErrorZPtr { result }
2349 let err = unsafe { o.contents.err };
2350 unsafe { o.contents.err = std::ptr::null_mut(); }
2351 CResult_TxCreationKeysSecpErrorZPtr { err }
2355 result_ok: o.result_ok,
2360 pub union CResult_TrustedCommitmentTransactionNoneZPtr {
2361 pub result: *mut crate::ln::chan_utils::TrustedCommitmentTransaction,
2362 /// Note that this value is always NULL, as there are no contents in the Err variant
2363 pub err: *mut std::ffi::c_void,
2366 pub struct CResult_TrustedCommitmentTransactionNoneZ {
2367 pub contents: CResult_TrustedCommitmentTransactionNoneZPtr,
2368 pub result_ok: bool,
2371 pub extern "C" fn CResult_TrustedCommitmentTransactionNoneZ_ok(o: crate::ln::chan_utils::TrustedCommitmentTransaction) -> CResult_TrustedCommitmentTransactionNoneZ {
2372 CResult_TrustedCommitmentTransactionNoneZ {
2373 contents: CResult_TrustedCommitmentTransactionNoneZPtr {
2374 result: Box::into_raw(Box::new(o)),
2380 pub extern "C" fn CResult_TrustedCommitmentTransactionNoneZ_err() -> CResult_TrustedCommitmentTransactionNoneZ {
2381 CResult_TrustedCommitmentTransactionNoneZ {
2382 contents: CResult_TrustedCommitmentTransactionNoneZPtr {
2383 err: std::ptr::null_mut(),
2389 pub extern "C" fn CResult_TrustedCommitmentTransactionNoneZ_free(_res: CResult_TrustedCommitmentTransactionNoneZ) { }
2390 impl Drop for CResult_TrustedCommitmentTransactionNoneZ {
2391 fn drop(&mut self) {
2393 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2394 let _ = unsafe { Box::from_raw(self.contents.result) };
2400 impl From<crate::c_types::CResultTempl<crate::ln::chan_utils::TrustedCommitmentTransaction, u8>> for CResult_TrustedCommitmentTransactionNoneZ {
2401 fn from(mut o: crate::c_types::CResultTempl<crate::ln::chan_utils::TrustedCommitmentTransaction, u8>) -> Self {
2402 let contents = if o.result_ok {
2403 let result = unsafe { o.contents.result };
2404 unsafe { o.contents.result = std::ptr::null_mut() };
2405 CResult_TrustedCommitmentTransactionNoneZPtr { result }
2407 let _ = unsafe { Box::from_raw(o.contents.err) };
2408 o.contents.err = std::ptr::null_mut();
2409 CResult_TrustedCommitmentTransactionNoneZPtr { err: std::ptr::null_mut() }
2413 result_ok: o.result_ok,
2417 pub type CVec_RouteHopZ = crate::c_types::CVecTempl<crate::routing::router::RouteHop>;
2419 pub static CVec_RouteHopZ_free: extern "C" fn(CVec_RouteHopZ) = crate::c_types::CVecTempl_free::<crate::routing::router::RouteHop>;
2421 pub type CVec_CVec_RouteHopZZ = crate::c_types::CVecTempl<crate::c_types::CVecTempl<crate::routing::router::RouteHop>>;
2423 pub static CVec_CVec_RouteHopZZ_free: extern "C" fn(CVec_CVec_RouteHopZZ) = crate::c_types::CVecTempl_free::<crate::c_types::CVecTempl<crate::routing::router::RouteHop>>;
2426 pub union CResult_RouteDecodeErrorZPtr {
2427 pub result: *mut crate::routing::router::Route,
2428 pub err: *mut crate::ln::msgs::DecodeError,
2431 pub struct CResult_RouteDecodeErrorZ {
2432 pub contents: CResult_RouteDecodeErrorZPtr,
2433 pub result_ok: bool,
2436 pub extern "C" fn CResult_RouteDecodeErrorZ_ok(o: crate::routing::router::Route) -> CResult_RouteDecodeErrorZ {
2437 CResult_RouteDecodeErrorZ {
2438 contents: CResult_RouteDecodeErrorZPtr {
2439 result: Box::into_raw(Box::new(o)),
2445 pub extern "C" fn CResult_RouteDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_RouteDecodeErrorZ {
2446 CResult_RouteDecodeErrorZ {
2447 contents: CResult_RouteDecodeErrorZPtr {
2448 err: Box::into_raw(Box::new(e)),
2454 pub extern "C" fn CResult_RouteDecodeErrorZ_free(_res: CResult_RouteDecodeErrorZ) { }
2455 impl Drop for CResult_RouteDecodeErrorZ {
2456 fn drop(&mut self) {
2458 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2459 let _ = unsafe { Box::from_raw(self.contents.result) };
2462 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2463 let _ = unsafe { Box::from_raw(self.contents.err) };
2468 impl From<crate::c_types::CResultTempl<crate::routing::router::Route, crate::ln::msgs::DecodeError>> for CResult_RouteDecodeErrorZ {
2469 fn from(mut o: crate::c_types::CResultTempl<crate::routing::router::Route, crate::ln::msgs::DecodeError>) -> Self {
2470 let contents = if o.result_ok {
2471 let result = unsafe { o.contents.result };
2472 unsafe { o.contents.result = std::ptr::null_mut() };
2473 CResult_RouteDecodeErrorZPtr { result }
2475 let err = unsafe { o.contents.err };
2476 unsafe { o.contents.err = std::ptr::null_mut(); }
2477 CResult_RouteDecodeErrorZPtr { err }
2481 result_ok: o.result_ok,
2485 pub type CVec_RouteHintZ = crate::c_types::CVecTempl<crate::routing::router::RouteHint>;
2487 pub static CVec_RouteHintZ_free: extern "C" fn(CVec_RouteHintZ) = crate::c_types::CVecTempl_free::<crate::routing::router::RouteHint>;
2490 pub union CResult_RouteLightningErrorZPtr {
2491 pub result: *mut crate::routing::router::Route,
2492 pub err: *mut crate::ln::msgs::LightningError,
2495 pub struct CResult_RouteLightningErrorZ {
2496 pub contents: CResult_RouteLightningErrorZPtr,
2497 pub result_ok: bool,
2500 pub extern "C" fn CResult_RouteLightningErrorZ_ok(o: crate::routing::router::Route) -> CResult_RouteLightningErrorZ {
2501 CResult_RouteLightningErrorZ {
2502 contents: CResult_RouteLightningErrorZPtr {
2503 result: Box::into_raw(Box::new(o)),
2509 pub extern "C" fn CResult_RouteLightningErrorZ_err(e: crate::ln::msgs::LightningError) -> CResult_RouteLightningErrorZ {
2510 CResult_RouteLightningErrorZ {
2511 contents: CResult_RouteLightningErrorZPtr {
2512 err: Box::into_raw(Box::new(e)),
2518 pub extern "C" fn CResult_RouteLightningErrorZ_free(_res: CResult_RouteLightningErrorZ) { }
2519 impl Drop for CResult_RouteLightningErrorZ {
2520 fn drop(&mut self) {
2522 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2523 let _ = unsafe { Box::from_raw(self.contents.result) };
2526 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2527 let _ = unsafe { Box::from_raw(self.contents.err) };
2532 impl From<crate::c_types::CResultTempl<crate::routing::router::Route, crate::ln::msgs::LightningError>> for CResult_RouteLightningErrorZ {
2533 fn from(mut o: crate::c_types::CResultTempl<crate::routing::router::Route, crate::ln::msgs::LightningError>) -> Self {
2534 let contents = if o.result_ok {
2535 let result = unsafe { o.contents.result };
2536 unsafe { o.contents.result = std::ptr::null_mut() };
2537 CResult_RouteLightningErrorZPtr { result }
2539 let err = unsafe { o.contents.err };
2540 unsafe { o.contents.err = std::ptr::null_mut(); }
2541 CResult_RouteLightningErrorZPtr { err }
2545 result_ok: o.result_ok,
2550 pub union CResult_RoutingFeesDecodeErrorZPtr {
2551 pub result: *mut crate::routing::network_graph::RoutingFees,
2552 pub err: *mut crate::ln::msgs::DecodeError,
2555 pub struct CResult_RoutingFeesDecodeErrorZ {
2556 pub contents: CResult_RoutingFeesDecodeErrorZPtr,
2557 pub result_ok: bool,
2560 pub extern "C" fn CResult_RoutingFeesDecodeErrorZ_ok(o: crate::routing::network_graph::RoutingFees) -> CResult_RoutingFeesDecodeErrorZ {
2561 CResult_RoutingFeesDecodeErrorZ {
2562 contents: CResult_RoutingFeesDecodeErrorZPtr {
2563 result: Box::into_raw(Box::new(o)),
2569 pub extern "C" fn CResult_RoutingFeesDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_RoutingFeesDecodeErrorZ {
2570 CResult_RoutingFeesDecodeErrorZ {
2571 contents: CResult_RoutingFeesDecodeErrorZPtr {
2572 err: Box::into_raw(Box::new(e)),
2578 pub extern "C" fn CResult_RoutingFeesDecodeErrorZ_free(_res: CResult_RoutingFeesDecodeErrorZ) { }
2579 impl Drop for CResult_RoutingFeesDecodeErrorZ {
2580 fn drop(&mut self) {
2582 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2583 let _ = unsafe { Box::from_raw(self.contents.result) };
2586 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2587 let _ = unsafe { Box::from_raw(self.contents.err) };
2592 impl From<crate::c_types::CResultTempl<crate::routing::network_graph::RoutingFees, crate::ln::msgs::DecodeError>> for CResult_RoutingFeesDecodeErrorZ {
2593 fn from(mut o: crate::c_types::CResultTempl<crate::routing::network_graph::RoutingFees, crate::ln::msgs::DecodeError>) -> Self {
2594 let contents = if o.result_ok {
2595 let result = unsafe { o.contents.result };
2596 unsafe { o.contents.result = std::ptr::null_mut() };
2597 CResult_RoutingFeesDecodeErrorZPtr { result }
2599 let err = unsafe { o.contents.err };
2600 unsafe { o.contents.err = std::ptr::null_mut(); }
2601 CResult_RoutingFeesDecodeErrorZPtr { err }
2605 result_ok: o.result_ok,
2610 pub union CResult_NodeAnnouncementInfoDecodeErrorZPtr {
2611 pub result: *mut crate::routing::network_graph::NodeAnnouncementInfo,
2612 pub err: *mut crate::ln::msgs::DecodeError,
2615 pub struct CResult_NodeAnnouncementInfoDecodeErrorZ {
2616 pub contents: CResult_NodeAnnouncementInfoDecodeErrorZPtr,
2617 pub result_ok: bool,
2620 pub extern "C" fn CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: crate::routing::network_graph::NodeAnnouncementInfo) -> CResult_NodeAnnouncementInfoDecodeErrorZ {
2621 CResult_NodeAnnouncementInfoDecodeErrorZ {
2622 contents: CResult_NodeAnnouncementInfoDecodeErrorZPtr {
2623 result: Box::into_raw(Box::new(o)),
2629 pub extern "C" fn CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_NodeAnnouncementInfoDecodeErrorZ {
2630 CResult_NodeAnnouncementInfoDecodeErrorZ {
2631 contents: CResult_NodeAnnouncementInfoDecodeErrorZPtr {
2632 err: Box::into_raw(Box::new(e)),
2638 pub extern "C" fn CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: CResult_NodeAnnouncementInfoDecodeErrorZ) { }
2639 impl Drop for CResult_NodeAnnouncementInfoDecodeErrorZ {
2640 fn drop(&mut self) {
2642 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2643 let _ = unsafe { Box::from_raw(self.contents.result) };
2646 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2647 let _ = unsafe { Box::from_raw(self.contents.err) };
2652 impl From<crate::c_types::CResultTempl<crate::routing::network_graph::NodeAnnouncementInfo, crate::ln::msgs::DecodeError>> for CResult_NodeAnnouncementInfoDecodeErrorZ {
2653 fn from(mut o: crate::c_types::CResultTempl<crate::routing::network_graph::NodeAnnouncementInfo, crate::ln::msgs::DecodeError>) -> Self {
2654 let contents = if o.result_ok {
2655 let result = unsafe { o.contents.result };
2656 unsafe { o.contents.result = std::ptr::null_mut() };
2657 CResult_NodeAnnouncementInfoDecodeErrorZPtr { result }
2659 let err = unsafe { o.contents.err };
2660 unsafe { o.contents.err = std::ptr::null_mut(); }
2661 CResult_NodeAnnouncementInfoDecodeErrorZPtr { err }
2665 result_ok: o.result_ok,
2670 pub union CResult_NodeInfoDecodeErrorZPtr {
2671 pub result: *mut crate::routing::network_graph::NodeInfo,
2672 pub err: *mut crate::ln::msgs::DecodeError,
2675 pub struct CResult_NodeInfoDecodeErrorZ {
2676 pub contents: CResult_NodeInfoDecodeErrorZPtr,
2677 pub result_ok: bool,
2680 pub extern "C" fn CResult_NodeInfoDecodeErrorZ_ok(o: crate::routing::network_graph::NodeInfo) -> CResult_NodeInfoDecodeErrorZ {
2681 CResult_NodeInfoDecodeErrorZ {
2682 contents: CResult_NodeInfoDecodeErrorZPtr {
2683 result: Box::into_raw(Box::new(o)),
2689 pub extern "C" fn CResult_NodeInfoDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_NodeInfoDecodeErrorZ {
2690 CResult_NodeInfoDecodeErrorZ {
2691 contents: CResult_NodeInfoDecodeErrorZPtr {
2692 err: Box::into_raw(Box::new(e)),
2698 pub extern "C" fn CResult_NodeInfoDecodeErrorZ_free(_res: CResult_NodeInfoDecodeErrorZ) { }
2699 impl Drop for CResult_NodeInfoDecodeErrorZ {
2700 fn drop(&mut self) {
2702 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2703 let _ = unsafe { Box::from_raw(self.contents.result) };
2706 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2707 let _ = unsafe { Box::from_raw(self.contents.err) };
2712 impl From<crate::c_types::CResultTempl<crate::routing::network_graph::NodeInfo, crate::ln::msgs::DecodeError>> for CResult_NodeInfoDecodeErrorZ {
2713 fn from(mut o: crate::c_types::CResultTempl<crate::routing::network_graph::NodeInfo, crate::ln::msgs::DecodeError>) -> Self {
2714 let contents = if o.result_ok {
2715 let result = unsafe { o.contents.result };
2716 unsafe { o.contents.result = std::ptr::null_mut() };
2717 CResult_NodeInfoDecodeErrorZPtr { result }
2719 let err = unsafe { o.contents.err };
2720 unsafe { o.contents.err = std::ptr::null_mut(); }
2721 CResult_NodeInfoDecodeErrorZPtr { err }
2725 result_ok: o.result_ok,
2730 pub union CResult_NetworkGraphDecodeErrorZPtr {
2731 pub result: *mut crate::routing::network_graph::NetworkGraph,
2732 pub err: *mut crate::ln::msgs::DecodeError,
2735 pub struct CResult_NetworkGraphDecodeErrorZ {
2736 pub contents: CResult_NetworkGraphDecodeErrorZPtr,
2737 pub result_ok: bool,
2740 pub extern "C" fn CResult_NetworkGraphDecodeErrorZ_ok(o: crate::routing::network_graph::NetworkGraph) -> CResult_NetworkGraphDecodeErrorZ {
2741 CResult_NetworkGraphDecodeErrorZ {
2742 contents: CResult_NetworkGraphDecodeErrorZPtr {
2743 result: Box::into_raw(Box::new(o)),
2749 pub extern "C" fn CResult_NetworkGraphDecodeErrorZ_err(e: crate::ln::msgs::DecodeError) -> CResult_NetworkGraphDecodeErrorZ {
2750 CResult_NetworkGraphDecodeErrorZ {
2751 contents: CResult_NetworkGraphDecodeErrorZPtr {
2752 err: Box::into_raw(Box::new(e)),
2758 pub extern "C" fn CResult_NetworkGraphDecodeErrorZ_free(_res: CResult_NetworkGraphDecodeErrorZ) { }
2759 impl Drop for CResult_NetworkGraphDecodeErrorZ {
2760 fn drop(&mut self) {
2762 if unsafe { !(self.contents.result as *mut ()).is_null() } {
2763 let _ = unsafe { Box::from_raw(self.contents.result) };
2766 if unsafe { !(self.contents.err as *mut ()).is_null() } {
2767 let _ = unsafe { Box::from_raw(self.contents.err) };
2772 impl From<crate::c_types::CResultTempl<crate::routing::network_graph::NetworkGraph, crate::ln::msgs::DecodeError>> for CResult_NetworkGraphDecodeErrorZ {
2773 fn from(mut o: crate::c_types::CResultTempl<crate::routing::network_graph::NetworkGraph, crate::ln::msgs::DecodeError>) -> Self {
2774 let contents = if o.result_ok {
2775 let result = unsafe { o.contents.result };
2776 unsafe { o.contents.result = std::ptr::null_mut() };
2777 CResult_NetworkGraphDecodeErrorZPtr { result }
2779 let err = unsafe { o.contents.err };
2780 unsafe { o.contents.err = std::ptr::null_mut(); }
2781 CResult_NetworkGraphDecodeErrorZPtr { err }
2785 result_ok: o.result_ok,