/// but with all dynamically-allocated buffers duplicated in new buffers.
pub extern "C" fn CResult_NoneIOErrorZ_clone(orig: &CResult_NoneIOErrorZ) -> CResult_NoneIOErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::ln::channelmanager::ChannelDetailss of arbitrary size.
+/// A dynamically-allocated array of crate::lightning::ln::channel_state::ChannelDetailss of arbitrary size.
/// This corresponds to std::vector in C++
pub struct CVec_ChannelDetailsZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::ln::channelmanager::ChannelDetails,
+ pub data: *mut crate::lightning::ln::channel_state::ChannelDetails,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
impl CVec_ChannelDetailsZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::channelmanager::ChannelDetails> {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::channel_state::ChannelDetails> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::channelmanager::ChannelDetails] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::channel_state::ChannelDetails] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::lightning::ln::channelmanager::ChannelDetails>> for CVec_ChannelDetailsZ {
- fn from(v: Vec<crate::lightning::ln::channelmanager::ChannelDetails>) -> Self {
+impl From<Vec<crate::lightning::ln::channel_state::ChannelDetails>> for CVec_ChannelDetailsZ {
+ fn from(v: Vec<crate::lightning::ln::channel_state::ChannelDetails>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
/// but with all dynamically-allocated buffers duplicated in new buffers.
pub extern "C" fn COption_C2Tuple_u64u16ZZ_clone(orig: &COption_C2Tuple_u64u16ZZ) -> COption_C2Tuple_u64u16ZZ { Clone::clone(&orig) }
#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a crate::lightning::ln::channelmanager::ChannelShutdownState or not
-pub enum COption_ChannelShutdownStateZ {
- /// When we're in this state, this COption_ChannelShutdownStateZ contains a crate::lightning::ln::channelmanager::ChannelShutdownState
- Some(crate::lightning::ln::channelmanager::ChannelShutdownState),
- /// When we're in this state, this COption_ChannelShutdownStateZ contains nothing
- None
-}
-impl COption_ChannelShutdownStateZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
- }
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
- }
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::ln::channelmanager::ChannelShutdownState {
- if let Self::Some(v) = self { v } else { unreachable!() }
- }
-}
-#[no_mangle]
-/// Constructs a new COption_ChannelShutdownStateZ containing a crate::lightning::ln::channelmanager::ChannelShutdownState
-pub extern "C" fn COption_ChannelShutdownStateZ_some(o: crate::lightning::ln::channelmanager::ChannelShutdownState) -> COption_ChannelShutdownStateZ {
- COption_ChannelShutdownStateZ::Some(o)
-}
-#[no_mangle]
-/// Constructs a new COption_ChannelShutdownStateZ containing nothing
-pub extern "C" fn COption_ChannelShutdownStateZ_none() -> COption_ChannelShutdownStateZ {
- COption_ChannelShutdownStateZ::None
-}
-#[no_mangle]
-/// Frees any resources associated with the crate::lightning::ln::channelmanager::ChannelShutdownState, if we are in the Some state
-pub extern "C" fn COption_ChannelShutdownStateZ_free(_res: COption_ChannelShutdownStateZ) { }
-#[no_mangle]
-/// Creates a new COption_ChannelShutdownStateZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_ChannelShutdownStateZ_clone(orig: &COption_ChannelShutdownStateZ) -> COption_ChannelShutdownStateZ { Clone::clone(&orig) }
-#[repr(C)]
/// The contents of CResult_ChannelIdAPIErrorZ
pub union CResult_ChannelIdAPIErrorZPtr {
/// A pointer to the contents in the success state.
}
}
#[repr(C)]
-/// The contents of CResult_CounterpartyForwardingInfoDecodeErrorZ
-pub union CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
+/// The contents of CResult_PhantomRouteHintsDecodeErrorZ
+pub union CResult_PhantomRouteHintsDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::CounterpartyForwardingInfo,
+ pub result: *mut crate::lightning::ln::channelmanager::PhantomRouteHints,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_CounterpartyForwardingInfoDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::CounterpartyForwardingInfo on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_PhantomRouteHintsDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channelmanager::PhantomRouteHints on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_CounterpartyForwardingInfoDecodeErrorZ {
- /// The contents of this CResult_CounterpartyForwardingInfoDecodeErrorZ, accessible via either
+pub struct CResult_PhantomRouteHintsDecodeErrorZ {
+ /// The contents of this CResult_PhantomRouteHintsDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr,
- /// Whether this CResult_CounterpartyForwardingInfoDecodeErrorZ represents a success state.
+ pub contents: CResult_PhantomRouteHintsDecodeErrorZPtr,
+ /// Whether this CResult_PhantomRouteHintsDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the success state.
-pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::CounterpartyForwardingInfo) -> CResult_CounterpartyForwardingInfoDecodeErrorZ {
- CResult_CounterpartyForwardingInfoDecodeErrorZ {
- contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
+/// Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the success state.
+pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::PhantomRouteHints) -> CResult_PhantomRouteHintsDecodeErrorZ {
+ CResult_PhantomRouteHintsDecodeErrorZ {
+ contents: CResult_PhantomRouteHintsDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the error state.
-pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_CounterpartyForwardingInfoDecodeErrorZ {
- CResult_CounterpartyForwardingInfoDecodeErrorZ {
- contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
+/// Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the error state.
+pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PhantomRouteHintsDecodeErrorZ {
+ CResult_PhantomRouteHintsDecodeErrorZ {
+ contents: CResult_PhantomRouteHintsDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_is_ok(o: &CResult_CounterpartyForwardingInfoDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_is_ok(o: &CResult_PhantomRouteHintsDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_CounterpartyForwardingInfoDecodeErrorZ.
-pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_free(_res: CResult_CounterpartyForwardingInfoDecodeErrorZ) { }
-impl Drop for CResult_CounterpartyForwardingInfoDecodeErrorZ {
+/// Frees any resources used by the CResult_PhantomRouteHintsDecodeErrorZ.
+pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_free(_res: CResult_PhantomRouteHintsDecodeErrorZ) { }
+impl Drop for CResult_PhantomRouteHintsDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::CounterpartyForwardingInfo, crate::lightning::ln::msgs::DecodeError>> for CResult_CounterpartyForwardingInfoDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::CounterpartyForwardingInfo, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PhantomRouteHints, crate::lightning::ln::msgs::DecodeError>> for CResult_PhantomRouteHintsDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PhantomRouteHints, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_CounterpartyForwardingInfoDecodeErrorZPtr { result }
+ CResult_PhantomRouteHintsDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_CounterpartyForwardingInfoDecodeErrorZPtr { err }
+ CResult_PhantomRouteHintsDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_CounterpartyForwardingInfoDecodeErrorZ {
+impl Clone for CResult_PhantomRouteHintsDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::CounterpartyForwardingInfo>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_PhantomRouteHintsDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::PhantomRouteHints>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_PhantomRouteHintsDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_PhantomRouteHintsDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_clone(orig: &CResult_CounterpartyForwardingInfoDecodeErrorZ) -> CResult_CounterpartyForwardingInfoDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_clone(orig: &CResult_PhantomRouteHintsDecodeErrorZ) -> CResult_PhantomRouteHintsDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelCounterpartyDecodeErrorZ
-pub union CResult_ChannelCounterpartyDecodeErrorZPtr {
+/// The contents of CResult_BlindedForwardDecodeErrorZ
+pub union CResult_BlindedForwardDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::ChannelCounterparty,
+ pub result: *mut crate::lightning::ln::channelmanager::BlindedForward,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ChannelCounterpartyDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::ChannelCounterparty on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_BlindedForwardDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channelmanager::BlindedForward on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelCounterpartyDecodeErrorZ {
- /// The contents of this CResult_ChannelCounterpartyDecodeErrorZ, accessible via either
+pub struct CResult_BlindedForwardDecodeErrorZ {
+ /// The contents of this CResult_BlindedForwardDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelCounterpartyDecodeErrorZPtr,
- /// Whether this CResult_ChannelCounterpartyDecodeErrorZ represents a success state.
+ pub contents: CResult_BlindedForwardDecodeErrorZPtr,
+ /// Whether this CResult_BlindedForwardDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::ChannelCounterparty) -> CResult_ChannelCounterpartyDecodeErrorZ {
- CResult_ChannelCounterpartyDecodeErrorZ {
- contents: CResult_ChannelCounterpartyDecodeErrorZPtr {
+/// Creates a new CResult_BlindedForwardDecodeErrorZ in the success state.
+pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::BlindedForward) -> CResult_BlindedForwardDecodeErrorZ {
+ CResult_BlindedForwardDecodeErrorZ {
+ contents: CResult_BlindedForwardDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelCounterpartyDecodeErrorZ {
- CResult_ChannelCounterpartyDecodeErrorZ {
- contents: CResult_ChannelCounterpartyDecodeErrorZPtr {
+/// Creates a new CResult_BlindedForwardDecodeErrorZ in the error state.
+pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_BlindedForwardDecodeErrorZ {
+ CResult_BlindedForwardDecodeErrorZ {
+ contents: CResult_BlindedForwardDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_is_ok(o: &CResult_ChannelCounterpartyDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_is_ok(o: &CResult_BlindedForwardDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelCounterpartyDecodeErrorZ.
-pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_free(_res: CResult_ChannelCounterpartyDecodeErrorZ) { }
-impl Drop for CResult_ChannelCounterpartyDecodeErrorZ {
+/// Frees any resources used by the CResult_BlindedForwardDecodeErrorZ.
+pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_free(_res: CResult_BlindedForwardDecodeErrorZ) { }
+impl Drop for CResult_BlindedForwardDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::ChannelCounterparty, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelCounterpartyDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::ChannelCounterparty, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::BlindedForward, crate::lightning::ln::msgs::DecodeError>> for CResult_BlindedForwardDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::BlindedForward, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelCounterpartyDecodeErrorZPtr { result }
+ CResult_BlindedForwardDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelCounterpartyDecodeErrorZPtr { err }
+ CResult_BlindedForwardDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChannelCounterpartyDecodeErrorZ {
+impl Clone for CResult_BlindedForwardDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelCounterpartyDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::ChannelCounterparty>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_BlindedForwardDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::BlindedForward>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChannelCounterpartyDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_BlindedForwardDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelCounterpartyDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_BlindedForwardDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_clone(orig: &CResult_ChannelCounterpartyDecodeErrorZ) -> CResult_ChannelCounterpartyDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_clone(orig: &CResult_BlindedForwardDecodeErrorZ) -> CResult_BlindedForwardDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelDetailsDecodeErrorZ
-pub union CResult_ChannelDetailsDecodeErrorZPtr {
+/// The contents of CResult_PendingHTLCRoutingDecodeErrorZ
+pub union CResult_PendingHTLCRoutingDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::ChannelDetails,
+ pub result: *mut crate::lightning::ln::channelmanager::PendingHTLCRouting,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ChannelDetailsDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::ChannelDetails on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_PendingHTLCRoutingDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channelmanager::PendingHTLCRouting on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelDetailsDecodeErrorZ {
- /// The contents of this CResult_ChannelDetailsDecodeErrorZ, accessible via either
+pub struct CResult_PendingHTLCRoutingDecodeErrorZ {
+ /// The contents of this CResult_PendingHTLCRoutingDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelDetailsDecodeErrorZPtr,
- /// Whether this CResult_ChannelDetailsDecodeErrorZ represents a success state.
+ pub contents: CResult_PendingHTLCRoutingDecodeErrorZPtr,
+ /// Whether this CResult_PendingHTLCRoutingDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ChannelDetailsDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::ChannelDetails) -> CResult_ChannelDetailsDecodeErrorZ {
- CResult_ChannelDetailsDecodeErrorZ {
- contents: CResult_ChannelDetailsDecodeErrorZPtr {
+/// Creates a new CResult_PendingHTLCRoutingDecodeErrorZ in the success state.
+pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::PendingHTLCRouting) -> CResult_PendingHTLCRoutingDecodeErrorZ {
+ CResult_PendingHTLCRoutingDecodeErrorZ {
+ contents: CResult_PendingHTLCRoutingDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelDetailsDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelDetailsDecodeErrorZ {
- CResult_ChannelDetailsDecodeErrorZ {
- contents: CResult_ChannelDetailsDecodeErrorZPtr {
+/// Creates a new CResult_PendingHTLCRoutingDecodeErrorZ in the error state.
+pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PendingHTLCRoutingDecodeErrorZ {
+ CResult_PendingHTLCRoutingDecodeErrorZ {
+ contents: CResult_PendingHTLCRoutingDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_is_ok(o: &CResult_ChannelDetailsDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_is_ok(o: &CResult_PendingHTLCRoutingDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelDetailsDecodeErrorZ.
-pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_free(_res: CResult_ChannelDetailsDecodeErrorZ) { }
-impl Drop for CResult_ChannelDetailsDecodeErrorZ {
+/// Frees any resources used by the CResult_PendingHTLCRoutingDecodeErrorZ.
+pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_free(_res: CResult_PendingHTLCRoutingDecodeErrorZ) { }
+impl Drop for CResult_PendingHTLCRoutingDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::ChannelDetails, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelDetailsDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::ChannelDetails, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PendingHTLCRouting, crate::lightning::ln::msgs::DecodeError>> for CResult_PendingHTLCRoutingDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PendingHTLCRouting, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelDetailsDecodeErrorZPtr { result }
+ CResult_PendingHTLCRoutingDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelDetailsDecodeErrorZPtr { err }
+ CResult_PendingHTLCRoutingDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChannelDetailsDecodeErrorZ {
+impl Clone for CResult_PendingHTLCRoutingDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelDetailsDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::ChannelDetails>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_PendingHTLCRoutingDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::PendingHTLCRouting>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChannelDetailsDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_PendingHTLCRoutingDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelDetailsDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_PendingHTLCRoutingDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_clone(orig: &CResult_ChannelDetailsDecodeErrorZ) -> CResult_ChannelDetailsDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_clone(orig: &CResult_PendingHTLCRoutingDecodeErrorZ) -> CResult_PendingHTLCRoutingDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_PhantomRouteHintsDecodeErrorZ
-pub union CResult_PhantomRouteHintsDecodeErrorZPtr {
+/// The contents of CResult_PendingHTLCInfoDecodeErrorZ
+pub union CResult_PendingHTLCInfoDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::PhantomRouteHints,
+ pub result: *mut crate::lightning::ln::channelmanager::PendingHTLCInfo,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_PhantomRouteHintsDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::PhantomRouteHints on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_PendingHTLCInfoDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channelmanager::PendingHTLCInfo on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_PhantomRouteHintsDecodeErrorZ {
- /// The contents of this CResult_PhantomRouteHintsDecodeErrorZ, accessible via either
+pub struct CResult_PendingHTLCInfoDecodeErrorZ {
+ /// The contents of this CResult_PendingHTLCInfoDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_PhantomRouteHintsDecodeErrorZPtr,
- /// Whether this CResult_PhantomRouteHintsDecodeErrorZ represents a success state.
+ pub contents: CResult_PendingHTLCInfoDecodeErrorZPtr,
+ /// Whether this CResult_PendingHTLCInfoDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the success state.
-pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::PhantomRouteHints) -> CResult_PhantomRouteHintsDecodeErrorZ {
- CResult_PhantomRouteHintsDecodeErrorZ {
- contents: CResult_PhantomRouteHintsDecodeErrorZPtr {
+/// Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the success state.
+pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::PendingHTLCInfo) -> CResult_PendingHTLCInfoDecodeErrorZ {
+ CResult_PendingHTLCInfoDecodeErrorZ {
+ contents: CResult_PendingHTLCInfoDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_PhantomRouteHintsDecodeErrorZ in the error state.
-pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PhantomRouteHintsDecodeErrorZ {
- CResult_PhantomRouteHintsDecodeErrorZ {
- contents: CResult_PhantomRouteHintsDecodeErrorZPtr {
+/// Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the error state.
+pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PendingHTLCInfoDecodeErrorZ {
+ CResult_PendingHTLCInfoDecodeErrorZ {
+ contents: CResult_PendingHTLCInfoDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_is_ok(o: &CResult_PhantomRouteHintsDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_is_ok(o: &CResult_PendingHTLCInfoDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_PhantomRouteHintsDecodeErrorZ.
-pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_free(_res: CResult_PhantomRouteHintsDecodeErrorZ) { }
-impl Drop for CResult_PhantomRouteHintsDecodeErrorZ {
+/// Frees any resources used by the CResult_PendingHTLCInfoDecodeErrorZ.
+pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_free(_res: CResult_PendingHTLCInfoDecodeErrorZ) { }
+impl Drop for CResult_PendingHTLCInfoDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PhantomRouteHints, crate::lightning::ln::msgs::DecodeError>> for CResult_PhantomRouteHintsDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PhantomRouteHints, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PendingHTLCInfo, crate::lightning::ln::msgs::DecodeError>> for CResult_PendingHTLCInfoDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PendingHTLCInfo, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_PhantomRouteHintsDecodeErrorZPtr { result }
+ CResult_PendingHTLCInfoDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_PhantomRouteHintsDecodeErrorZPtr { err }
+ CResult_PendingHTLCInfoDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_PhantomRouteHintsDecodeErrorZ {
+impl Clone for CResult_PendingHTLCInfoDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_PhantomRouteHintsDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::PhantomRouteHints>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_PendingHTLCInfoDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::PendingHTLCInfo>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_PhantomRouteHintsDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_PendingHTLCInfoDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_PhantomRouteHintsDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_PendingHTLCInfoDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_PhantomRouteHintsDecodeErrorZ_clone(orig: &CResult_PhantomRouteHintsDecodeErrorZ) -> CResult_PhantomRouteHintsDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_clone(orig: &CResult_PendingHTLCInfoDecodeErrorZ) -> CResult_PendingHTLCInfoDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_BlindedForwardDecodeErrorZ
-pub union CResult_BlindedForwardDecodeErrorZPtr {
+/// The contents of CResult_BlindedFailureDecodeErrorZ
+pub union CResult_BlindedFailureDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::BlindedForward,
+ pub result: *mut crate::lightning::ln::channelmanager::BlindedFailure,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_BlindedForwardDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::BlindedForward on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_BlindedFailureDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channelmanager::BlindedFailure on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_BlindedForwardDecodeErrorZ {
- /// The contents of this CResult_BlindedForwardDecodeErrorZ, accessible via either
+pub struct CResult_BlindedFailureDecodeErrorZ {
+ /// The contents of this CResult_BlindedFailureDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_BlindedForwardDecodeErrorZPtr,
- /// Whether this CResult_BlindedForwardDecodeErrorZ represents a success state.
+ pub contents: CResult_BlindedFailureDecodeErrorZPtr,
+ /// Whether this CResult_BlindedFailureDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_BlindedForwardDecodeErrorZ in the success state.
-pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::BlindedForward) -> CResult_BlindedForwardDecodeErrorZ {
- CResult_BlindedForwardDecodeErrorZ {
- contents: CResult_BlindedForwardDecodeErrorZPtr {
+/// Creates a new CResult_BlindedFailureDecodeErrorZ in the success state.
+pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::BlindedFailure) -> CResult_BlindedFailureDecodeErrorZ {
+ CResult_BlindedFailureDecodeErrorZ {
+ contents: CResult_BlindedFailureDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_BlindedForwardDecodeErrorZ in the error state.
-pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_BlindedForwardDecodeErrorZ {
- CResult_BlindedForwardDecodeErrorZ {
- contents: CResult_BlindedForwardDecodeErrorZPtr {
+/// Creates a new CResult_BlindedFailureDecodeErrorZ in the error state.
+pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_BlindedFailureDecodeErrorZ {
+ CResult_BlindedFailureDecodeErrorZ {
+ contents: CResult_BlindedFailureDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_is_ok(o: &CResult_BlindedForwardDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_is_ok(o: &CResult_BlindedFailureDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_BlindedForwardDecodeErrorZ.
-pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_free(_res: CResult_BlindedForwardDecodeErrorZ) { }
-impl Drop for CResult_BlindedForwardDecodeErrorZ {
+/// Frees any resources used by the CResult_BlindedFailureDecodeErrorZ.
+pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_free(_res: CResult_BlindedFailureDecodeErrorZ) { }
+impl Drop for CResult_BlindedFailureDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::BlindedForward, crate::lightning::ln::msgs::DecodeError>> for CResult_BlindedForwardDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::BlindedForward, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::BlindedFailure, crate::lightning::ln::msgs::DecodeError>> for CResult_BlindedFailureDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::BlindedFailure, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_BlindedForwardDecodeErrorZPtr { result }
+ CResult_BlindedFailureDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_BlindedForwardDecodeErrorZPtr { err }
+ CResult_BlindedFailureDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_BlindedForwardDecodeErrorZ {
+impl Clone for CResult_BlindedFailureDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_BlindedForwardDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::BlindedForward>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_BlindedFailureDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::BlindedFailure>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_BlindedForwardDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_BlindedFailureDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_BlindedForwardDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_BlindedFailureDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_BlindedForwardDecodeErrorZ_clone(orig: &CResult_BlindedForwardDecodeErrorZ) -> CResult_BlindedForwardDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_clone(orig: &CResult_BlindedFailureDecodeErrorZ) -> CResult_BlindedFailureDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_PendingHTLCRoutingDecodeErrorZ
-pub union CResult_PendingHTLCRoutingDecodeErrorZPtr {
+/// A dynamically-allocated array of crate::lightning::chain::channelmonitor::ChannelMonitors of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_ChannelMonitorZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::lightning::chain::channelmonitor::ChannelMonitor,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
+}
+impl CVec_ChannelMonitorZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::chain::channelmonitor::ChannelMonitor> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
+ }
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::chain::channelmonitor::ChannelMonitor] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ }
+}
+impl From<Vec<crate::lightning::chain::channelmonitor::ChannelMonitor>> for CVec_ChannelMonitorZ {
+ fn from(v: Vec<crate::lightning::chain::channelmonitor::ChannelMonitor>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
+}
+#[no_mangle]
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_ChannelMonitorZ_free(_res: CVec_ChannelMonitorZ) { }
+impl Drop for CVec_ChannelMonitorZ {
+ fn drop(&mut self) {
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ }
+}
+impl Clone for CVec_ChannelMonitorZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
+#[repr(C)]
+/// A tuple of 2 elements. See the individual fields for the types contained.
+pub struct C2Tuple_ThirtyTwoBytesChannelManagerZ {
+ /// The element at position 0
+ pub a: crate::c_types::ThirtyTwoBytes,
+ /// The element at position 1
+ pub b: crate::lightning::ln::channelmanager::ChannelManager,
+}
+impl From<(crate::c_types::ThirtyTwoBytes, crate::lightning::ln::channelmanager::ChannelManager)> for C2Tuple_ThirtyTwoBytesChannelManagerZ {
+ fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::lightning::ln::channelmanager::ChannelManager)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_ThirtyTwoBytesChannelManagerZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::lightning::ln::channelmanager::ChannelManager) {
+ (self.a, self.b)
+ }
+}
+/// Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements.
+#[no_mangle]
+pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelManagerZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::lightning::ln::channelmanager::ChannelManager) -> C2Tuple_ThirtyTwoBytesChannelManagerZ {
+ C2Tuple_ThirtyTwoBytesChannelManagerZ { a, b, }
+}
+
+#[no_mangle]
+/// Frees any resources used by the C2Tuple_ThirtyTwoBytesChannelManagerZ.
+pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelManagerZ_free(_res: C2Tuple_ThirtyTwoBytesChannelManagerZ) { }
+#[repr(C)]
+/// The contents of CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ
+pub union CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::PendingHTLCRouting,
+ pub result: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_PendingHTLCRoutingDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::PendingHTLCRouting on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_PendingHTLCRoutingDecodeErrorZ {
- /// The contents of this CResult_PendingHTLCRoutingDecodeErrorZ, accessible via either
+pub struct CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
+ /// The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_PendingHTLCRoutingDecodeErrorZPtr,
- /// Whether this CResult_PendingHTLCRoutingDecodeErrorZ represents a success state.
+ pub contents: CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr,
+ /// Whether this CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_PendingHTLCRoutingDecodeErrorZ in the success state.
-pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::PendingHTLCRouting) -> CResult_PendingHTLCRoutingDecodeErrorZ {
- CResult_PendingHTLCRoutingDecodeErrorZ {
- contents: CResult_PendingHTLCRoutingDecodeErrorZPtr {
+/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o: crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
+ CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
+ contents: CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_PendingHTLCRoutingDecodeErrorZ in the error state.
-pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PendingHTLCRoutingDecodeErrorZ {
- CResult_PendingHTLCRoutingDecodeErrorZ {
- contents: CResult_PendingHTLCRoutingDecodeErrorZPtr {
+/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the error state.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
+ CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
+ contents: CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_is_ok(o: &CResult_PendingHTLCRoutingDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_is_ok(o: &CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_PendingHTLCRoutingDecodeErrorZ.
-pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_free(_res: CResult_PendingHTLCRoutingDecodeErrorZ) { }
-impl Drop for CResult_PendingHTLCRoutingDecodeErrorZ {
+/// Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(_res: CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ) { }
+impl Drop for CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PendingHTLCRouting, crate::lightning::ln::msgs::DecodeError>> for CResult_PendingHTLCRoutingDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PendingHTLCRouting, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ, crate::lightning::ln::msgs::DecodeError>> for CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_PendingHTLCRoutingDecodeErrorZPtr { result }
+ CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_PendingHTLCRoutingDecodeErrorZPtr { err }
+ CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_PendingHTLCRoutingDecodeErrorZ {
- fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_PendingHTLCRoutingDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::PendingHTLCRouting>::clone(unsafe { &*self.contents.result })))
- } }
- } else {
- Self { result_ok: false, contents: CResult_PendingHTLCRoutingDecodeErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
- } }
- }
- }
-}
-#[no_mangle]
-/// Creates a new CResult_PendingHTLCRoutingDecodeErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_PendingHTLCRoutingDecodeErrorZ_clone(orig: &CResult_PendingHTLCRoutingDecodeErrorZ) -> CResult_PendingHTLCRoutingDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_PendingHTLCInfoDecodeErrorZ
-pub union CResult_PendingHTLCInfoDecodeErrorZPtr {
+/// The contents of CResult_MaxDustHTLCExposureDecodeErrorZ
+pub union CResult_MaxDustHTLCExposureDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::PendingHTLCInfo,
+ pub result: *mut crate::lightning::util::config::MaxDustHTLCExposure,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_PendingHTLCInfoDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::PendingHTLCInfo on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_MaxDustHTLCExposureDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::util::config::MaxDustHTLCExposure on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_PendingHTLCInfoDecodeErrorZ {
- /// The contents of this CResult_PendingHTLCInfoDecodeErrorZ, accessible via either
+pub struct CResult_MaxDustHTLCExposureDecodeErrorZ {
+ /// The contents of this CResult_MaxDustHTLCExposureDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_PendingHTLCInfoDecodeErrorZPtr,
- /// Whether this CResult_PendingHTLCInfoDecodeErrorZ represents a success state.
+ pub contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr,
+ /// Whether this CResult_MaxDustHTLCExposureDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the success state.
-pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::PendingHTLCInfo) -> CResult_PendingHTLCInfoDecodeErrorZ {
- CResult_PendingHTLCInfoDecodeErrorZ {
- contents: CResult_PendingHTLCInfoDecodeErrorZPtr {
+/// Creates a new CResult_MaxDustHTLCExposureDecodeErrorZ in the success state.
+pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_ok(o: crate::lightning::util::config::MaxDustHTLCExposure) -> CResult_MaxDustHTLCExposureDecodeErrorZ {
+ CResult_MaxDustHTLCExposureDecodeErrorZ {
+ contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_PendingHTLCInfoDecodeErrorZ in the error state.
-pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PendingHTLCInfoDecodeErrorZ {
- CResult_PendingHTLCInfoDecodeErrorZ {
- contents: CResult_PendingHTLCInfoDecodeErrorZPtr {
+/// Creates a new CResult_MaxDustHTLCExposureDecodeErrorZ in the error state.
+pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_MaxDustHTLCExposureDecodeErrorZ {
+ CResult_MaxDustHTLCExposureDecodeErrorZ {
+ contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_is_ok(o: &CResult_PendingHTLCInfoDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_is_ok(o: &CResult_MaxDustHTLCExposureDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_PendingHTLCInfoDecodeErrorZ.
-pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_free(_res: CResult_PendingHTLCInfoDecodeErrorZ) { }
-impl Drop for CResult_PendingHTLCInfoDecodeErrorZ {
+/// Frees any resources used by the CResult_MaxDustHTLCExposureDecodeErrorZ.
+pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_free(_res: CResult_MaxDustHTLCExposureDecodeErrorZ) { }
+impl Drop for CResult_MaxDustHTLCExposureDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PendingHTLCInfo, crate::lightning::ln::msgs::DecodeError>> for CResult_PendingHTLCInfoDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::PendingHTLCInfo, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::util::config::MaxDustHTLCExposure, crate::lightning::ln::msgs::DecodeError>> for CResult_MaxDustHTLCExposureDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::util::config::MaxDustHTLCExposure, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_PendingHTLCInfoDecodeErrorZPtr { result }
+ CResult_MaxDustHTLCExposureDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_PendingHTLCInfoDecodeErrorZPtr { err }
+ CResult_MaxDustHTLCExposureDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_PendingHTLCInfoDecodeErrorZ {
+impl Clone for CResult_MaxDustHTLCExposureDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_PendingHTLCInfoDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::PendingHTLCInfo>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::util::config::MaxDustHTLCExposure>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_PendingHTLCInfoDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_PendingHTLCInfoDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_MaxDustHTLCExposureDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_PendingHTLCInfoDecodeErrorZ_clone(orig: &CResult_PendingHTLCInfoDecodeErrorZ) -> CResult_PendingHTLCInfoDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_clone(orig: &CResult_MaxDustHTLCExposureDecodeErrorZ) -> CResult_MaxDustHTLCExposureDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_BlindedFailureDecodeErrorZ
-pub union CResult_BlindedFailureDecodeErrorZPtr {
+/// The contents of CResult_ChannelConfigDecodeErrorZ
+pub union CResult_ChannelConfigDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::BlindedFailure,
+ pub result: *mut crate::lightning::util::config::ChannelConfig,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_BlindedFailureDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::BlindedFailure on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ChannelConfigDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::util::config::ChannelConfig on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_BlindedFailureDecodeErrorZ {
- /// The contents of this CResult_BlindedFailureDecodeErrorZ, accessible via either
+pub struct CResult_ChannelConfigDecodeErrorZ {
+ /// The contents of this CResult_ChannelConfigDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_BlindedFailureDecodeErrorZPtr,
- /// Whether this CResult_BlindedFailureDecodeErrorZ represents a success state.
+ pub contents: CResult_ChannelConfigDecodeErrorZPtr,
+ /// Whether this CResult_ChannelConfigDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_BlindedFailureDecodeErrorZ in the success state.
-pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::BlindedFailure) -> CResult_BlindedFailureDecodeErrorZ {
- CResult_BlindedFailureDecodeErrorZ {
- contents: CResult_BlindedFailureDecodeErrorZPtr {
+/// Creates a new CResult_ChannelConfigDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_ok(o: crate::lightning::util::config::ChannelConfig) -> CResult_ChannelConfigDecodeErrorZ {
+ CResult_ChannelConfigDecodeErrorZ {
+ contents: CResult_ChannelConfigDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_BlindedFailureDecodeErrorZ in the error state.
-pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_BlindedFailureDecodeErrorZ {
- CResult_BlindedFailureDecodeErrorZ {
- contents: CResult_BlindedFailureDecodeErrorZPtr {
+/// Creates a new CResult_ChannelConfigDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelConfigDecodeErrorZ {
+ CResult_ChannelConfigDecodeErrorZ {
+ contents: CResult_ChannelConfigDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_is_ok(o: &CResult_BlindedFailureDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_is_ok(o: &CResult_ChannelConfigDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_BlindedFailureDecodeErrorZ.
-pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_free(_res: CResult_BlindedFailureDecodeErrorZ) { }
-impl Drop for CResult_BlindedFailureDecodeErrorZ {
+/// Frees any resources used by the CResult_ChannelConfigDecodeErrorZ.
+pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_free(_res: CResult_ChannelConfigDecodeErrorZ) { }
+impl Drop for CResult_ChannelConfigDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::BlindedFailure, crate::lightning::ln::msgs::DecodeError>> for CResult_BlindedFailureDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::BlindedFailure, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::util::config::ChannelConfig, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelConfigDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::util::config::ChannelConfig, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_BlindedFailureDecodeErrorZPtr { result }
+ CResult_ChannelConfigDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_BlindedFailureDecodeErrorZPtr { err }
+ CResult_ChannelConfigDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_BlindedFailureDecodeErrorZ {
+impl Clone for CResult_ChannelConfigDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_BlindedFailureDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::BlindedFailure>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ChannelConfigDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::util::config::ChannelConfig>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_BlindedFailureDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ChannelConfigDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_BlindedFailureDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ChannelConfigDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_BlindedFailureDecodeErrorZ_clone(orig: &CResult_BlindedFailureDecodeErrorZ) -> CResult_BlindedFailureDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_clone(orig: &CResult_ChannelConfigDecodeErrorZ) -> CResult_ChannelConfigDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelShutdownStateDecodeErrorZ
-pub union CResult_ChannelShutdownStateDecodeErrorZPtr {
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::util::config::MaxDustHTLCExposure or not
+pub enum COption_MaxDustHTLCExposureZ {
+ /// When we're in this state, this COption_MaxDustHTLCExposureZ contains a crate::lightning::util::config::MaxDustHTLCExposure
+ Some(crate::lightning::util::config::MaxDustHTLCExposure),
+ /// When we're in this state, this COption_MaxDustHTLCExposureZ contains nothing
+ None
+}
+impl COption_MaxDustHTLCExposureZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::util::config::MaxDustHTLCExposure {
+ if let Self::Some(v) = self { v } else { unreachable!() }
+ }
+}
+#[no_mangle]
+/// Constructs a new COption_MaxDustHTLCExposureZ containing a crate::lightning::util::config::MaxDustHTLCExposure
+pub extern "C" fn COption_MaxDustHTLCExposureZ_some(o: crate::lightning::util::config::MaxDustHTLCExposure) -> COption_MaxDustHTLCExposureZ {
+ COption_MaxDustHTLCExposureZ::Some(o)
+}
+#[no_mangle]
+/// Constructs a new COption_MaxDustHTLCExposureZ containing nothing
+pub extern "C" fn COption_MaxDustHTLCExposureZ_none() -> COption_MaxDustHTLCExposureZ {
+ COption_MaxDustHTLCExposureZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the crate::lightning::util::config::MaxDustHTLCExposure, if we are in the Some state
+pub extern "C" fn COption_MaxDustHTLCExposureZ_free(_res: COption_MaxDustHTLCExposureZ) { }
+#[no_mangle]
+/// Creates a new COption_MaxDustHTLCExposureZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_MaxDustHTLCExposureZ_clone(orig: &COption_MaxDustHTLCExposureZ) -> COption_MaxDustHTLCExposureZ { Clone::clone(&orig) }
+#[repr(C)]
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::util::errors::APIError or not
+pub enum COption_APIErrorZ {
+ /// When we're in this state, this COption_APIErrorZ contains a crate::lightning::util::errors::APIError
+ Some(crate::lightning::util::errors::APIError),
+ /// When we're in this state, this COption_APIErrorZ contains nothing
+ None
+}
+impl COption_APIErrorZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::util::errors::APIError {
+ if let Self::Some(v) = self { v } else { unreachable!() }
+ }
+}
+#[no_mangle]
+/// Constructs a new COption_APIErrorZ containing a crate::lightning::util::errors::APIError
+pub extern "C" fn COption_APIErrorZ_some(o: crate::lightning::util::errors::APIError) -> COption_APIErrorZ {
+ COption_APIErrorZ::Some(o)
+}
+#[no_mangle]
+/// Constructs a new COption_APIErrorZ containing nothing
+pub extern "C" fn COption_APIErrorZ_none() -> COption_APIErrorZ {
+ COption_APIErrorZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the crate::lightning::util::errors::APIError, if we are in the Some state
+pub extern "C" fn COption_APIErrorZ_free(_res: COption_APIErrorZ) { }
+#[no_mangle]
+/// Creates a new COption_APIErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_APIErrorZ_clone(orig: &COption_APIErrorZ) -> COption_APIErrorZ { Clone::clone(&orig) }
+#[repr(C)]
+/// The contents of CResult_COption_APIErrorZDecodeErrorZ
+pub union CResult_COption_APIErrorZDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::channelmanager::ChannelShutdownState,
+ pub result: *mut crate::c_types::derived::COption_APIErrorZ,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ChannelShutdownStateDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::channelmanager::ChannelShutdownState on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_COption_APIErrorZDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::COption_APIErrorZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelShutdownStateDecodeErrorZ {
- /// The contents of this CResult_ChannelShutdownStateDecodeErrorZ, accessible via either
+pub struct CResult_COption_APIErrorZDecodeErrorZ {
+ /// The contents of this CResult_COption_APIErrorZDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelShutdownStateDecodeErrorZPtr,
- /// Whether this CResult_ChannelShutdownStateDecodeErrorZ represents a success state.
+ pub contents: CResult_COption_APIErrorZDecodeErrorZPtr,
+ /// Whether this CResult_COption_APIErrorZDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ChannelShutdownStateDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_ok(o: crate::lightning::ln::channelmanager::ChannelShutdownState) -> CResult_ChannelShutdownStateDecodeErrorZ {
- CResult_ChannelShutdownStateDecodeErrorZ {
- contents: CResult_ChannelShutdownStateDecodeErrorZPtr {
+/// Creates a new CResult_COption_APIErrorZDecodeErrorZ in the success state.
+pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_ok(o: crate::c_types::derived::COption_APIErrorZ) -> CResult_COption_APIErrorZDecodeErrorZ {
+ CResult_COption_APIErrorZDecodeErrorZ {
+ contents: CResult_COption_APIErrorZDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelShutdownStateDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelShutdownStateDecodeErrorZ {
- CResult_ChannelShutdownStateDecodeErrorZ {
- contents: CResult_ChannelShutdownStateDecodeErrorZPtr {
+/// Creates a new CResult_COption_APIErrorZDecodeErrorZ in the error state.
+pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_APIErrorZDecodeErrorZ {
+ CResult_COption_APIErrorZDecodeErrorZ {
+ contents: CResult_COption_APIErrorZDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_is_ok(o: &CResult_ChannelShutdownStateDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_is_ok(o: &CResult_COption_APIErrorZDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelShutdownStateDecodeErrorZ.
-pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_free(_res: CResult_ChannelShutdownStateDecodeErrorZ) { }
-impl Drop for CResult_ChannelShutdownStateDecodeErrorZ {
+/// Frees any resources used by the CResult_COption_APIErrorZDecodeErrorZ.
+pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_free(_res: CResult_COption_APIErrorZDecodeErrorZ) { }
+impl Drop for CResult_COption_APIErrorZDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::ChannelShutdownState, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelShutdownStateDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channelmanager::ChannelShutdownState, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_APIErrorZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_APIErrorZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_APIErrorZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelShutdownStateDecodeErrorZPtr { result }
+ CResult_COption_APIErrorZDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelShutdownStateDecodeErrorZPtr { err }
+ CResult_COption_APIErrorZDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChannelShutdownStateDecodeErrorZ {
+impl Clone for CResult_COption_APIErrorZDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelShutdownStateDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::channelmanager::ChannelShutdownState>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_COption_APIErrorZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::COption_APIErrorZ>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChannelShutdownStateDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_COption_APIErrorZDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelShutdownStateDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_COption_APIErrorZDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_clone(orig: &CResult_ChannelShutdownStateDecodeErrorZ) -> CResult_ChannelShutdownStateDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_clone(orig: &CResult_COption_APIErrorZDecodeErrorZ) -> CResult_COption_APIErrorZDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::chain::channelmonitor::ChannelMonitors of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_ChannelMonitorZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::chain::channelmonitor::ChannelMonitor,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
-}
-impl CVec_ChannelMonitorZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::chain::channelmonitor::ChannelMonitor> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::chain::channelmonitor::ChannelMonitor] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
- }
+/// The contents of CResult_ChannelMonitorUpdateDecodeErrorZ
+pub union CResult_ChannelMonitorUpdateDecodeErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::lightning::chain::channelmonitor::ChannelMonitorUpdate,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
-impl From<Vec<crate::lightning::chain::channelmonitor::ChannelMonitor>> for CVec_ChannelMonitorZ {
- fn from(v: Vec<crate::lightning::chain::channelmonitor::ChannelMonitor>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
- }
+#[repr(C)]
+/// A CResult_ChannelMonitorUpdateDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::chain::channelmonitor::ChannelMonitorUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_ChannelMonitorUpdateDecodeErrorZ {
+ /// The contents of this CResult_ChannelMonitorUpdateDecodeErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr,
+ /// Whether this CResult_ChannelMonitorUpdateDecodeErrorZ represents a success state.
+ pub result_ok: bool,
}
#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_ChannelMonitorZ_free(_res: CVec_ChannelMonitorZ) { }
-impl Drop for CVec_ChannelMonitorZ {
- fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
- }
-}
-impl Clone for CVec_ChannelMonitorZ {
- fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
- }
-}
-#[repr(C)]
-/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_ThirtyTwoBytesChannelManagerZ {
- /// The element at position 0
- pub a: crate::c_types::ThirtyTwoBytes,
- /// The element at position 1
- pub b: crate::lightning::ln::channelmanager::ChannelManager,
-}
-impl From<(crate::c_types::ThirtyTwoBytes, crate::lightning::ln::channelmanager::ChannelManager)> for C2Tuple_ThirtyTwoBytesChannelManagerZ {
- fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::lightning::ln::channelmanager::ChannelManager)) -> Self {
- Self {
- a: tup.0,
- b: tup.1,
- }
- }
-}
-impl C2Tuple_ThirtyTwoBytesChannelManagerZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::lightning::ln::channelmanager::ChannelManager) {
- (self.a, self.b)
- }
-}
-/// Creates a new C2Tuple_ThirtyTwoBytesChannelManagerZ from the contained elements.
-#[no_mangle]
-pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelManagerZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::lightning::ln::channelmanager::ChannelManager) -> C2Tuple_ThirtyTwoBytesChannelManagerZ {
- C2Tuple_ThirtyTwoBytesChannelManagerZ { a, b, }
-}
-
-#[no_mangle]
-/// Frees any resources used by the C2Tuple_ThirtyTwoBytesChannelManagerZ.
-pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelManagerZ_free(_res: C2Tuple_ThirtyTwoBytesChannelManagerZ) { }
-#[repr(C)]
-/// The contents of CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ
-pub union CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr {
- /// A pointer to the contents in the success state.
- /// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::DecodeError,
-}
-#[repr(C)]
-/// A CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
-/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
- /// The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ, accessible via either
- /// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr,
- /// Whether this CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ represents a success state.
- pub result_ok: bool,
-}
-#[no_mangle]
-/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the success state.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_ok(o: crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
- CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
- contents: CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr {
+/// Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: crate::lightning::chain::channelmonitor::ChannelMonitorUpdate) -> CResult_ChannelMonitorUpdateDecodeErrorZ {
+ CResult_ChannelMonitorUpdateDecodeErrorZ {
+ contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ in the error state.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
- CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
- contents: CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr {
+/// Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelMonitorUpdateDecodeErrorZ {
+ CResult_ChannelMonitorUpdateDecodeErrorZ {
+ contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_is_ok(o: &CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o: &CResult_ChannelMonitorUpdateDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ_free(_res: CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ) { }
-impl Drop for CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
+/// Frees any resources used by the CResult_ChannelMonitorUpdateDecodeErrorZ.
+pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: CResult_ChannelMonitorUpdateDecodeErrorZ) { }
+impl Drop for CResult_ChannelMonitorUpdateDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ, crate::lightning::ln::msgs::DecodeError>> for CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelManagerZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::chain::channelmonitor::ChannelMonitorUpdate, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelMonitorUpdateDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::chain::channelmonitor::ChannelMonitorUpdate, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr { result }
+ CResult_ChannelMonitorUpdateDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_C2Tuple_ThirtyTwoBytesChannelManagerZDecodeErrorZPtr { err }
+ CResult_ChannelMonitorUpdateDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
+impl Clone for CResult_ChannelMonitorUpdateDecodeErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::chain::channelmonitor::ChannelMonitorUpdate>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: &CResult_ChannelMonitorUpdateDecodeErrorZ) -> CResult_ChannelMonitorUpdateDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_MaxDustHTLCExposureDecodeErrorZ
-pub union CResult_MaxDustHTLCExposureDecodeErrorZPtr {
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::chain::channelmonitor::MonitorEvent or not
+pub enum COption_MonitorEventZ {
+ /// When we're in this state, this COption_MonitorEventZ contains a crate::lightning::chain::channelmonitor::MonitorEvent
+ Some(crate::lightning::chain::channelmonitor::MonitorEvent),
+ /// When we're in this state, this COption_MonitorEventZ contains nothing
+ None
+}
+impl COption_MonitorEventZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::chain::channelmonitor::MonitorEvent {
+ if let Self::Some(v) = self { v } else { unreachable!() }
+ }
+}
+#[no_mangle]
+/// Constructs a new COption_MonitorEventZ containing a crate::lightning::chain::channelmonitor::MonitorEvent
+pub extern "C" fn COption_MonitorEventZ_some(o: crate::lightning::chain::channelmonitor::MonitorEvent) -> COption_MonitorEventZ {
+ COption_MonitorEventZ::Some(o)
+}
+#[no_mangle]
+/// Constructs a new COption_MonitorEventZ containing nothing
+pub extern "C" fn COption_MonitorEventZ_none() -> COption_MonitorEventZ {
+ COption_MonitorEventZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the crate::lightning::chain::channelmonitor::MonitorEvent, if we are in the Some state
+pub extern "C" fn COption_MonitorEventZ_free(_res: COption_MonitorEventZ) { }
+#[no_mangle]
+/// Creates a new COption_MonitorEventZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_MonitorEventZ_clone(orig: &COption_MonitorEventZ) -> COption_MonitorEventZ { Clone::clone(&orig) }
+#[repr(C)]
+/// The contents of CResult_COption_MonitorEventZDecodeErrorZ
+pub union CResult_COption_MonitorEventZDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::util::config::MaxDustHTLCExposure,
+ pub result: *mut crate::c_types::derived::COption_MonitorEventZ,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_MaxDustHTLCExposureDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::util::config::MaxDustHTLCExposure on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_COption_MonitorEventZDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::COption_MonitorEventZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_MaxDustHTLCExposureDecodeErrorZ {
- /// The contents of this CResult_MaxDustHTLCExposureDecodeErrorZ, accessible via either
+pub struct CResult_COption_MonitorEventZDecodeErrorZ {
+ /// The contents of this CResult_COption_MonitorEventZDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr,
- /// Whether this CResult_MaxDustHTLCExposureDecodeErrorZ represents a success state.
+ pub contents: CResult_COption_MonitorEventZDecodeErrorZPtr,
+ /// Whether this CResult_COption_MonitorEventZDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_MaxDustHTLCExposureDecodeErrorZ in the success state.
-pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_ok(o: crate::lightning::util::config::MaxDustHTLCExposure) -> CResult_MaxDustHTLCExposureDecodeErrorZ {
- CResult_MaxDustHTLCExposureDecodeErrorZ {
- contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr {
+/// Creates a new CResult_COption_MonitorEventZDecodeErrorZ in the success state.
+pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_ok(o: crate::c_types::derived::COption_MonitorEventZ) -> CResult_COption_MonitorEventZDecodeErrorZ {
+ CResult_COption_MonitorEventZDecodeErrorZ {
+ contents: CResult_COption_MonitorEventZDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_MaxDustHTLCExposureDecodeErrorZ in the error state.
-pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_MaxDustHTLCExposureDecodeErrorZ {
- CResult_MaxDustHTLCExposureDecodeErrorZ {
- contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr {
+/// Creates a new CResult_COption_MonitorEventZDecodeErrorZ in the error state.
+pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_MonitorEventZDecodeErrorZ {
+ CResult_COption_MonitorEventZDecodeErrorZ {
+ contents: CResult_COption_MonitorEventZDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_is_ok(o: &CResult_MaxDustHTLCExposureDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o: &CResult_COption_MonitorEventZDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_MaxDustHTLCExposureDecodeErrorZ.
-pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_free(_res: CResult_MaxDustHTLCExposureDecodeErrorZ) { }
-impl Drop for CResult_MaxDustHTLCExposureDecodeErrorZ {
+/// Frees any resources used by the CResult_COption_MonitorEventZDecodeErrorZ.
+pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_free(_res: CResult_COption_MonitorEventZDecodeErrorZ) { }
+impl Drop for CResult_COption_MonitorEventZDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::util::config::MaxDustHTLCExposure, crate::lightning::ln::msgs::DecodeError>> for CResult_MaxDustHTLCExposureDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::util::config::MaxDustHTLCExposure, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_MonitorEventZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_MonitorEventZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_MonitorEventZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_MaxDustHTLCExposureDecodeErrorZPtr { result }
+ CResult_COption_MonitorEventZDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_MaxDustHTLCExposureDecodeErrorZPtr { err }
+ CResult_COption_MonitorEventZDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_MaxDustHTLCExposureDecodeErrorZ {
+impl Clone for CResult_COption_MonitorEventZDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::util::config::MaxDustHTLCExposure>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_COption_MonitorEventZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::COption_MonitorEventZ>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_MaxDustHTLCExposureDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_COption_MonitorEventZDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_MaxDustHTLCExposureDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_COption_MonitorEventZDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_MaxDustHTLCExposureDecodeErrorZ_clone(orig: &CResult_MaxDustHTLCExposureDecodeErrorZ) -> CResult_MaxDustHTLCExposureDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_clone(orig: &CResult_COption_MonitorEventZDecodeErrorZ) -> CResult_COption_MonitorEventZDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelConfigDecodeErrorZ
-pub union CResult_ChannelConfigDecodeErrorZPtr {
+/// The contents of CResult_HTLCUpdateDecodeErrorZ
+pub union CResult_HTLCUpdateDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::util::config::ChannelConfig,
+ pub result: *mut crate::lightning::chain::channelmonitor::HTLCUpdate,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ChannelConfigDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::util::config::ChannelConfig on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_HTLCUpdateDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::chain::channelmonitor::HTLCUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelConfigDecodeErrorZ {
- /// The contents of this CResult_ChannelConfigDecodeErrorZ, accessible via either
+pub struct CResult_HTLCUpdateDecodeErrorZ {
+ /// The contents of this CResult_HTLCUpdateDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelConfigDecodeErrorZPtr,
- /// Whether this CResult_ChannelConfigDecodeErrorZ represents a success state.
+ pub contents: CResult_HTLCUpdateDecodeErrorZPtr,
+ /// Whether this CResult_HTLCUpdateDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ChannelConfigDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_ok(o: crate::lightning::util::config::ChannelConfig) -> CResult_ChannelConfigDecodeErrorZ {
- CResult_ChannelConfigDecodeErrorZ {
- contents: CResult_ChannelConfigDecodeErrorZPtr {
+/// Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state.
+pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_ok(o: crate::lightning::chain::channelmonitor::HTLCUpdate) -> CResult_HTLCUpdateDecodeErrorZ {
+ CResult_HTLCUpdateDecodeErrorZ {
+ contents: CResult_HTLCUpdateDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelConfigDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelConfigDecodeErrorZ {
- CResult_ChannelConfigDecodeErrorZ {
- contents: CResult_ChannelConfigDecodeErrorZPtr {
+/// Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state.
+pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_HTLCUpdateDecodeErrorZ {
+ CResult_HTLCUpdateDecodeErrorZ {
+ contents: CResult_HTLCUpdateDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_is_ok(o: &CResult_ChannelConfigDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_is_ok(o: &CResult_HTLCUpdateDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelConfigDecodeErrorZ.
-pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_free(_res: CResult_ChannelConfigDecodeErrorZ) { }
-impl Drop for CResult_ChannelConfigDecodeErrorZ {
+/// Frees any resources used by the CResult_HTLCUpdateDecodeErrorZ.
+pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_free(_res: CResult_HTLCUpdateDecodeErrorZ) { }
+impl Drop for CResult_HTLCUpdateDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::util::config::ChannelConfig, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelConfigDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::util::config::ChannelConfig, crate::lightning::ln::msgs::DecodeError>) -> Self {
- let contents = if o.result_ok {
+impl From<crate::c_types::CResultTempl<crate::lightning::chain::channelmonitor::HTLCUpdate, crate::lightning::ln::msgs::DecodeError>> for CResult_HTLCUpdateDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::chain::channelmonitor::HTLCUpdate, crate::lightning::ln::msgs::DecodeError>) -> Self {
+ let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelConfigDecodeErrorZPtr { result }
+ CResult_HTLCUpdateDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelConfigDecodeErrorZPtr { err }
+ CResult_HTLCUpdateDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChannelConfigDecodeErrorZ {
+impl Clone for CResult_HTLCUpdateDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelConfigDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::util::config::ChannelConfig>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_HTLCUpdateDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::chain::channelmonitor::HTLCUpdate>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChannelConfigDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_HTLCUpdateDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelConfigDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_HTLCUpdateDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelConfigDecodeErrorZ_clone(orig: &CResult_ChannelConfigDecodeErrorZ) -> CResult_ChannelConfigDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_clone(orig: &CResult_HTLCUpdateDecodeErrorZ) -> CResult_HTLCUpdateDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a crate::lightning::util::config::MaxDustHTLCExposure or not
-pub enum COption_MaxDustHTLCExposureZ {
- /// When we're in this state, this COption_MaxDustHTLCExposureZ contains a crate::lightning::util::config::MaxDustHTLCExposure
- Some(crate::lightning::util::config::MaxDustHTLCExposure),
- /// When we're in this state, this COption_MaxDustHTLCExposureZ contains nothing
- None
+/// A tuple of 2 elements. See the individual fields for the types contained.
+pub struct C2Tuple_OutPointCVec_u8ZZ {
+ /// The element at position 0
+ pub a: crate::lightning::chain::transaction::OutPoint,
+ /// The element at position 1
+ pub b: crate::c_types::derived::CVec_u8Z,
}
-impl COption_MaxDustHTLCExposureZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
+impl From<(crate::lightning::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z)> for C2Tuple_OutPointCVec_u8ZZ {
+ fn from (tup: (crate::lightning::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
}
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
+}
+impl C2Tuple_OutPointCVec_u8ZZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::lightning::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z) {
+ (self.a, self.b)
}
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::util::config::MaxDustHTLCExposure {
- if let Self::Some(v) = self { v } else { unreachable!() }
+}
+impl Clone for C2Tuple_OutPointCVec_u8ZZ {
+ fn clone(&self) -> Self {
+ Self {
+ a: Clone::clone(&self.a),
+ b: Clone::clone(&self.b),
+ }
}
}
#[no_mangle]
-/// Constructs a new COption_MaxDustHTLCExposureZ containing a crate::lightning::util::config::MaxDustHTLCExposure
-pub extern "C" fn COption_MaxDustHTLCExposureZ_some(o: crate::lightning::util::config::MaxDustHTLCExposure) -> COption_MaxDustHTLCExposureZ {
- COption_MaxDustHTLCExposureZ::Some(o)
-}
+/// Creates a new tuple which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn C2Tuple_OutPointCVec_u8ZZ_clone(orig: &C2Tuple_OutPointCVec_u8ZZ) -> C2Tuple_OutPointCVec_u8ZZ { Clone::clone(&orig) }
+/// Creates a new C2Tuple_OutPointCVec_u8ZZ from the contained elements.
#[no_mangle]
-/// Constructs a new COption_MaxDustHTLCExposureZ containing nothing
-pub extern "C" fn COption_MaxDustHTLCExposureZ_none() -> COption_MaxDustHTLCExposureZ {
- COption_MaxDustHTLCExposureZ::None
+pub extern "C" fn C2Tuple_OutPointCVec_u8ZZ_new(a: crate::lightning::chain::transaction::OutPoint, b: crate::c_types::derived::CVec_u8Z) -> C2Tuple_OutPointCVec_u8ZZ {
+ C2Tuple_OutPointCVec_u8ZZ { a, b, }
}
+
#[no_mangle]
-/// Frees any resources associated with the crate::lightning::util::config::MaxDustHTLCExposure, if we are in the Some state
-pub extern "C" fn COption_MaxDustHTLCExposureZ_free(_res: COption_MaxDustHTLCExposureZ) { }
-#[no_mangle]
-/// Creates a new COption_MaxDustHTLCExposureZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_MaxDustHTLCExposureZ_clone(orig: &COption_MaxDustHTLCExposureZ) -> COption_MaxDustHTLCExposureZ { Clone::clone(&orig) }
+/// Frees any resources used by the C2Tuple_OutPointCVec_u8ZZ.
+pub extern "C" fn C2Tuple_OutPointCVec_u8ZZ_free(_res: C2Tuple_OutPointCVec_u8ZZ) { }
#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a crate::lightning::util::errors::APIError or not
-pub enum COption_APIErrorZ {
- /// When we're in this state, this COption_APIErrorZ contains a crate::lightning::util::errors::APIError
- Some(crate::lightning::util::errors::APIError),
- /// When we're in this state, this COption_APIErrorZ contains nothing
- None
+/// A tuple of 2 elements. See the individual fields for the types contained.
+pub struct C2Tuple_u32CVec_u8ZZ {
+ /// The element at position 0
+ pub a: u32,
+ /// The element at position 1
+ pub b: crate::c_types::derived::CVec_u8Z,
}
-impl COption_APIErrorZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
+impl From<(u32, crate::c_types::derived::CVec_u8Z)> for C2Tuple_u32CVec_u8ZZ {
+ fn from (tup: (u32, crate::c_types::derived::CVec_u8Z)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
}
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
+}
+impl C2Tuple_u32CVec_u8ZZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (u32, crate::c_types::derived::CVec_u8Z) {
+ (self.a, self.b)
}
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::util::errors::APIError {
- if let Self::Some(v) = self { v } else { unreachable!() }
+}
+impl Clone for C2Tuple_u32CVec_u8ZZ {
+ fn clone(&self) -> Self {
+ Self {
+ a: Clone::clone(&self.a),
+ b: Clone::clone(&self.b),
+ }
}
}
#[no_mangle]
-/// Constructs a new COption_APIErrorZ containing a crate::lightning::util::errors::APIError
-pub extern "C" fn COption_APIErrorZ_some(o: crate::lightning::util::errors::APIError) -> COption_APIErrorZ {
- COption_APIErrorZ::Some(o)
-}
+/// Creates a new tuple which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn C2Tuple_u32CVec_u8ZZ_clone(orig: &C2Tuple_u32CVec_u8ZZ) -> C2Tuple_u32CVec_u8ZZ { Clone::clone(&orig) }
+/// Creates a new C2Tuple_u32CVec_u8ZZ from the contained elements.
#[no_mangle]
-/// Constructs a new COption_APIErrorZ containing nothing
-pub extern "C" fn COption_APIErrorZ_none() -> COption_APIErrorZ {
- COption_APIErrorZ::None
+pub extern "C" fn C2Tuple_u32CVec_u8ZZ_new(a: u32, b: crate::c_types::derived::CVec_u8Z) -> C2Tuple_u32CVec_u8ZZ {
+ C2Tuple_u32CVec_u8ZZ { a, b, }
}
+
#[no_mangle]
-/// Frees any resources associated with the crate::lightning::util::errors::APIError, if we are in the Some state
-pub extern "C" fn COption_APIErrorZ_free(_res: COption_APIErrorZ) { }
-#[no_mangle]
-/// Creates a new COption_APIErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_APIErrorZ_clone(orig: &COption_APIErrorZ) -> COption_APIErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// The contents of CResult_COption_APIErrorZDecodeErrorZ
-pub union CResult_COption_APIErrorZDecodeErrorZPtr {
- /// A pointer to the contents in the success state.
- /// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::COption_APIErrorZ,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::DecodeError,
-}
+/// Frees any resources used by the C2Tuple_u32CVec_u8ZZ.
+pub extern "C" fn C2Tuple_u32CVec_u8ZZ_free(_res: C2Tuple_u32CVec_u8ZZ) { }
#[repr(C)]
-/// A CResult_COption_APIErrorZDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::COption_APIErrorZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
-/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_COption_APIErrorZDecodeErrorZ {
- /// The contents of this CResult_COption_APIErrorZDecodeErrorZ, accessible via either
- /// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_COption_APIErrorZDecodeErrorZPtr,
- /// Whether this CResult_COption_APIErrorZDecodeErrorZ represents a success state.
- pub result_ok: bool,
+/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32CVec_u8ZZs of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_C2Tuple_u32CVec_u8ZZZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::c_types::derived::C2Tuple_u32CVec_u8ZZ,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
}
-#[no_mangle]
-/// Creates a new CResult_COption_APIErrorZDecodeErrorZ in the success state.
-pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_ok(o: crate::c_types::derived::COption_APIErrorZ) -> CResult_COption_APIErrorZDecodeErrorZ {
- CResult_COption_APIErrorZDecodeErrorZ {
- contents: CResult_COption_APIErrorZDecodeErrorZPtr {
- result: Box::into_raw(Box::new(o)),
- },
- result_ok: true,
+impl CVec_C2Tuple_u32CVec_u8ZZZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_u32CVec_u8ZZ> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
}
-}
-#[no_mangle]
-/// Creates a new CResult_COption_APIErrorZDecodeErrorZ in the error state.
-pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_APIErrorZDecodeErrorZ {
- CResult_COption_APIErrorZDecodeErrorZ {
- contents: CResult_COption_APIErrorZDecodeErrorZPtr {
- err: Box::into_raw(Box::new(e)),
- },
- result_ok: false,
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_u32CVec_u8ZZ] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-/// Checks if the given object is currently in the success state
-#[no_mangle]
-pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_is_ok(o: &CResult_COption_APIErrorZDecodeErrorZ) -> bool {
- o.result_ok
+impl From<Vec<crate::c_types::derived::C2Tuple_u32CVec_u8ZZ>> for CVec_C2Tuple_u32CVec_u8ZZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_u32CVec_u8ZZ>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
}
#[no_mangle]
-/// Frees any resources used by the CResult_COption_APIErrorZDecodeErrorZ.
-pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_free(_res: CResult_COption_APIErrorZDecodeErrorZ) { }
-impl Drop for CResult_COption_APIErrorZDecodeErrorZ {
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_C2Tuple_u32CVec_u8ZZZ_free(_res: CVec_C2Tuple_u32CVec_u8ZZZ) { }
+impl Drop for CVec_C2Tuple_u32CVec_u8ZZZ {
fn drop(&mut self) {
- if self.result_ok {
- if unsafe { !(self.contents.result as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.result) };
- }
- } else {
- if unsafe { !(self.contents.err as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.err) };
- }
- }
- }
-}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_APIErrorZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_APIErrorZDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_APIErrorZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
- let contents = if o.result_ok {
- let result = unsafe { o.contents.result };
- unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_COption_APIErrorZDecodeErrorZPtr { result }
- } else {
- let err = unsafe { o.contents.err };
- unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_COption_APIErrorZDecodeErrorZPtr { err }
- };
- Self {
- contents,
- result_ok: o.result_ok,
- }
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CResult_COption_APIErrorZDecodeErrorZ {
+impl Clone for CVec_C2Tuple_u32CVec_u8ZZZ {
fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_COption_APIErrorZDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::COption_APIErrorZ>::clone(unsafe { &*self.contents.result })))
- } }
- } else {
- Self { result_ok: false, contents: CResult_COption_APIErrorZDecodeErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
- } }
- }
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
}
}
-#[no_mangle]
-/// Creates a new CResult_COption_APIErrorZDecodeErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_COption_APIErrorZDecodeErrorZ_clone(orig: &CResult_COption_APIErrorZDecodeErrorZ) -> CResult_COption_APIErrorZDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelMonitorUpdateDecodeErrorZ
-pub union CResult_ChannelMonitorUpdateDecodeErrorZPtr {
- /// A pointer to the contents in the success state.
- /// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::chain::channelmonitor::ChannelMonitorUpdate,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::DecodeError,
+/// A tuple of 2 elements. See the individual fields for the types contained.
+pub struct C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
+ /// The element at position 0
+ pub a: crate::c_types::ThirtyTwoBytes,
+ /// The element at position 1
+ pub b: crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ,
}
-#[repr(C)]
-/// A CResult_ChannelMonitorUpdateDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::chain::channelmonitor::ChannelMonitorUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure.
-/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelMonitorUpdateDecodeErrorZ {
- /// The contents of this CResult_ChannelMonitorUpdateDecodeErrorZ, accessible via either
- /// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr,
- /// Whether this CResult_ChannelMonitorUpdateDecodeErrorZ represents a success state.
- pub result_ok: bool,
+impl From<(crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ)> for C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
+ fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
}
-#[no_mangle]
-/// Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: crate::lightning::chain::channelmonitor::ChannelMonitorUpdate) -> CResult_ChannelMonitorUpdateDecodeErrorZ {
- CResult_ChannelMonitorUpdateDecodeErrorZ {
- contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
- result: Box::into_raw(Box::new(o)),
- },
- result_ok: true,
+impl C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ) {
+ (self.a, self.b)
+ }
+}
+impl Clone for C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
+ fn clone(&self) -> Self {
+ Self {
+ a: Clone::clone(&self.a),
+ b: Clone::clone(&self.b),
+ }
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelMonitorUpdateDecodeErrorZ {
- CResult_ChannelMonitorUpdateDecodeErrorZ {
- contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
- err: Box::into_raw(Box::new(e)),
- },
- result_ok: false,
+/// Creates a new tuple which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_clone(orig: &C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ) -> C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ { Clone::clone(&orig) }
+/// Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ from the contained elements.
+#[no_mangle]
+pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ) -> C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
+ C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ { a, b, }
+}
+
+#[no_mangle]
+/// Frees any resources used by the C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.
+pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_free(_res: C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ) { }
+#[repr(C)]
+/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZs of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
+}
+impl CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
+ }
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ }
+}
+impl From<Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ>> for CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
}
-/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(o: &CResult_ChannelMonitorUpdateDecodeErrorZ) -> bool {
- o.result_ok
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ_free(_res: CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ) { }
+impl Drop for CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
+ fn drop(&mut self) {
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ }
+}
+impl Clone for CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
+#[repr(C)]
+/// A dynamically-allocated array of crate::lightning::ln::chan_utils::CommitmentTransactions of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_CommitmentTransactionZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::lightning::ln::chan_utils::CommitmentTransaction,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
+}
+impl CVec_CommitmentTransactionZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::chan_utils::CommitmentTransaction> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
+ }
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::chan_utils::CommitmentTransaction] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ }
+}
+impl From<Vec<crate::lightning::ln::chan_utils::CommitmentTransaction>> for CVec_CommitmentTransactionZ {
+ fn from(v: Vec<crate::lightning::ln::chan_utils::CommitmentTransaction>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelMonitorUpdateDecodeErrorZ.
-pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: CResult_ChannelMonitorUpdateDecodeErrorZ) { }
-impl Drop for CResult_ChannelMonitorUpdateDecodeErrorZ {
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_CommitmentTransactionZ_free(_res: CVec_CommitmentTransactionZ) { }
+impl Drop for CVec_CommitmentTransactionZ {
fn drop(&mut self) {
- if self.result_ok {
- if unsafe { !(self.contents.result as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.result) };
- }
- } else {
- if unsafe { !(self.contents.err as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.err) };
- }
- }
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::chain::channelmonitor::ChannelMonitorUpdate, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelMonitorUpdateDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::chain::channelmonitor::ChannelMonitorUpdate, crate::lightning::ln::msgs::DecodeError>) -> Self {
- let contents = if o.result_ok {
- let result = unsafe { o.contents.result };
- unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelMonitorUpdateDecodeErrorZPtr { result }
- } else {
- let err = unsafe { o.contents.err };
- unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelMonitorUpdateDecodeErrorZPtr { err }
- };
+impl Clone for CVec_CommitmentTransactionZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
+#[repr(C)]
+/// A tuple of 2 elements. See the individual fields for the types contained.
+pub struct C2Tuple_u32TxOutZ {
+ /// The element at position 0
+ pub a: u32,
+ /// The element at position 1
+ pub b: crate::c_types::TxOut,
+}
+impl From<(u32, crate::c_types::TxOut)> for C2Tuple_u32TxOutZ {
+ fn from (tup: (u32, crate::c_types::TxOut)) -> Self {
Self {
- contents,
- result_ok: o.result_ok,
+ a: tup.0,
+ b: tup.1,
}
}
}
-impl Clone for CResult_ChannelMonitorUpdateDecodeErrorZ {
+impl C2Tuple_u32TxOutZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (u32, crate::c_types::TxOut) {
+ (self.a, self.b)
+ }
+}
+impl Clone for C2Tuple_u32TxOutZ {
fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::chain::channelmonitor::ChannelMonitorUpdate>::clone(unsafe { &*self.contents.result })))
- } }
- } else {
- Self { result_ok: false, contents: CResult_ChannelMonitorUpdateDecodeErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
- } }
+ Self {
+ a: Clone::clone(&self.a),
+ b: Clone::clone(&self.b),
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ which has the same data as `orig`
+/// Creates a new tuple which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: &CResult_ChannelMonitorUpdateDecodeErrorZ) -> CResult_ChannelMonitorUpdateDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn C2Tuple_u32TxOutZ_clone(orig: &C2Tuple_u32TxOutZ) -> C2Tuple_u32TxOutZ { Clone::clone(&orig) }
+/// Creates a new C2Tuple_u32TxOutZ from the contained elements.
+#[no_mangle]
+pub extern "C" fn C2Tuple_u32TxOutZ_new(a: u32, b: crate::c_types::TxOut) -> C2Tuple_u32TxOutZ {
+ C2Tuple_u32TxOutZ { a, b, }
+}
+
+#[no_mangle]
+/// Frees any resources used by the C2Tuple_u32TxOutZ.
+pub extern "C" fn C2Tuple_u32TxOutZ_free(_res: C2Tuple_u32TxOutZ) { }
#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a crate::lightning::chain::channelmonitor::MonitorEvent or not
-pub enum COption_MonitorEventZ {
- /// When we're in this state, this COption_MonitorEventZ contains a crate::lightning::chain::channelmonitor::MonitorEvent
- Some(crate::lightning::chain::channelmonitor::MonitorEvent),
- /// When we're in this state, this COption_MonitorEventZ contains nothing
- None
+/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32TxOutZs of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_C2Tuple_u32TxOutZZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::c_types::derived::C2Tuple_u32TxOutZ,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
}
-impl COption_MonitorEventZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
+impl CVec_C2Tuple_u32TxOutZZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_u32TxOutZ> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
}
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_u32TxOutZ] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::chain::channelmonitor::MonitorEvent {
- if let Self::Some(v) = self { v } else { unreachable!() }
+}
+impl From<Vec<crate::c_types::derived::C2Tuple_u32TxOutZ>> for CVec_C2Tuple_u32TxOutZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_u32TxOutZ>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
}
#[no_mangle]
-/// Constructs a new COption_MonitorEventZ containing a crate::lightning::chain::channelmonitor::MonitorEvent
-pub extern "C" fn COption_MonitorEventZ_some(o: crate::lightning::chain::channelmonitor::MonitorEvent) -> COption_MonitorEventZ {
- COption_MonitorEventZ::Some(o)
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_C2Tuple_u32TxOutZZ_free(_res: CVec_C2Tuple_u32TxOutZZ) { }
+impl Drop for CVec_C2Tuple_u32TxOutZZ {
+ fn drop(&mut self) {
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ }
}
-#[no_mangle]
-/// Constructs a new COption_MonitorEventZ containing nothing
-pub extern "C" fn COption_MonitorEventZ_none() -> COption_MonitorEventZ {
- COption_MonitorEventZ::None
+impl Clone for CVec_C2Tuple_u32TxOutZZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
+#[repr(C)]
+/// A tuple of 2 elements. See the individual fields for the types contained.
+pub struct C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
+ /// The element at position 0
+ pub a: crate::c_types::ThirtyTwoBytes,
+ /// The element at position 1
+ pub b: crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ,
+}
+impl From<(crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ)> for C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
+ fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ)) -> Self {
+ Self {
+ a: tup.0,
+ b: tup.1,
+ }
+ }
+}
+impl C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ) {
+ (self.a, self.b)
+ }
+}
+impl Clone for C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
+ fn clone(&self) -> Self {
+ Self {
+ a: Clone::clone(&self.a),
+ b: Clone::clone(&self.b),
+ }
+ }
}
#[no_mangle]
-/// Frees any resources associated with the crate::lightning::chain::channelmonitor::MonitorEvent, if we are in the Some state
-pub extern "C" fn COption_MonitorEventZ_free(_res: COption_MonitorEventZ) { }
-#[no_mangle]
-/// Creates a new COption_MonitorEventZ which has the same data as `orig`
+/// Creates a new tuple which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_MonitorEventZ_clone(orig: &COption_MonitorEventZ) -> COption_MonitorEventZ { Clone::clone(&orig) }
-#[repr(C)]
-/// The contents of CResult_COption_MonitorEventZDecodeErrorZ
-pub union CResult_COption_MonitorEventZDecodeErrorZPtr {
- /// A pointer to the contents in the success state.
- /// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::COption_MonitorEventZ,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::DecodeError,
+pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_clone(orig: &C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ) -> C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ { Clone::clone(&orig) }
+/// Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ from the contained elements.
+#[no_mangle]
+pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ) -> C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
+ C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ { a, b, }
}
+
+#[no_mangle]
+/// Frees any resources used by the C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.
+pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_free(_res: C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ) { }
#[repr(C)]
-/// A CResult_COption_MonitorEventZDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::COption_MonitorEventZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
-/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_COption_MonitorEventZDecodeErrorZ {
- /// The contents of this CResult_COption_MonitorEventZDecodeErrorZ, accessible via either
- /// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_COption_MonitorEventZDecodeErrorZPtr,
- /// Whether this CResult_COption_MonitorEventZDecodeErrorZ represents a success state.
- pub result_ok: bool,
+/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZs of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_TransactionOutputsZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
+}
+impl CVec_TransactionOutputsZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
+ }
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ }
+}
+impl From<Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ>> for CVec_TransactionOutputsZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
}
#[no_mangle]
-/// Creates a new CResult_COption_MonitorEventZDecodeErrorZ in the success state.
-pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_ok(o: crate::c_types::derived::COption_MonitorEventZ) -> CResult_COption_MonitorEventZDecodeErrorZ {
- CResult_COption_MonitorEventZDecodeErrorZ {
- contents: CResult_COption_MonitorEventZDecodeErrorZPtr {
- result: Box::into_raw(Box::new(o)),
- },
- result_ok: true,
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_TransactionOutputsZ_free(_res: CVec_TransactionOutputsZ) { }
+impl Drop for CVec_TransactionOutputsZ {
+ fn drop(&mut self) {
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-#[no_mangle]
-/// Creates a new CResult_COption_MonitorEventZDecodeErrorZ in the error state.
-pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_MonitorEventZDecodeErrorZ {
- CResult_COption_MonitorEventZDecodeErrorZ {
- contents: CResult_COption_MonitorEventZDecodeErrorZPtr {
- err: Box::into_raw(Box::new(e)),
- },
- result_ok: false,
+impl Clone for CVec_TransactionOutputsZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
}
}
-/// Checks if the given object is currently in the success state
-#[no_mangle]
-pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_is_ok(o: &CResult_COption_MonitorEventZDecodeErrorZ) -> bool {
- o.result_ok
+#[repr(C)]
+/// A dynamically-allocated array of crate::lightning::chain::channelmonitor::Balances of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_BalanceZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::lightning::chain::channelmonitor::Balance,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
+}
+impl CVec_BalanceZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::chain::channelmonitor::Balance> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
+ }
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::chain::channelmonitor::Balance] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ }
+}
+impl From<Vec<crate::lightning::chain::channelmonitor::Balance>> for CVec_BalanceZ {
+ fn from(v: Vec<crate::lightning::chain::channelmonitor::Balance>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
}
#[no_mangle]
-/// Frees any resources used by the CResult_COption_MonitorEventZDecodeErrorZ.
-pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_free(_res: CResult_COption_MonitorEventZDecodeErrorZ) { }
-impl Drop for CResult_COption_MonitorEventZDecodeErrorZ {
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_BalanceZ_free(_res: CVec_BalanceZ) { }
+impl Drop for CVec_BalanceZ {
fn drop(&mut self) {
- if self.result_ok {
- if unsafe { !(self.contents.result as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.result) };
- }
- } else {
- if unsafe { !(self.contents.err as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.err) };
- }
- }
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_MonitorEventZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_MonitorEventZDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_MonitorEventZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
- let contents = if o.result_ok {
- let result = unsafe { o.contents.result };
- unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_COption_MonitorEventZDecodeErrorZPtr { result }
- } else {
- let err = unsafe { o.contents.err };
- unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_COption_MonitorEventZDecodeErrorZPtr { err }
- };
+impl Clone for CVec_BalanceZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
+#[repr(C)]
+/// A tuple of 2 elements. See the individual fields for the types contained.
+pub struct C2Tuple_ThirtyTwoBytesChannelMonitorZ {
+ /// The element at position 0
+ pub a: crate::c_types::ThirtyTwoBytes,
+ /// The element at position 1
+ pub b: crate::lightning::chain::channelmonitor::ChannelMonitor,
+}
+impl From<(crate::c_types::ThirtyTwoBytes, crate::lightning::chain::channelmonitor::ChannelMonitor)> for C2Tuple_ThirtyTwoBytesChannelMonitorZ {
+ fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::lightning::chain::channelmonitor::ChannelMonitor)) -> Self {
Self {
- contents,
- result_ok: o.result_ok,
+ a: tup.0,
+ b: tup.1,
}
}
}
-impl Clone for CResult_COption_MonitorEventZDecodeErrorZ {
+impl C2Tuple_ThirtyTwoBytesChannelMonitorZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::lightning::chain::channelmonitor::ChannelMonitor) {
+ (self.a, self.b)
+ }
+}
+impl Clone for C2Tuple_ThirtyTwoBytesChannelMonitorZ {
fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_COption_MonitorEventZDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::COption_MonitorEventZ>::clone(unsafe { &*self.contents.result })))
- } }
- } else {
- Self { result_ok: false, contents: CResult_COption_MonitorEventZDecodeErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
- } }
+ Self {
+ a: Clone::clone(&self.a),
+ b: Clone::clone(&self.b),
}
}
}
#[no_mangle]
-/// Creates a new CResult_COption_MonitorEventZDecodeErrorZ which has the same data as `orig`
+/// Creates a new tuple which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_COption_MonitorEventZDecodeErrorZ_clone(orig: &CResult_COption_MonitorEventZDecodeErrorZ) -> CResult_COption_MonitorEventZDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelMonitorZ_clone(orig: &C2Tuple_ThirtyTwoBytesChannelMonitorZ) -> C2Tuple_ThirtyTwoBytesChannelMonitorZ { Clone::clone(&orig) }
+/// Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements.
+#[no_mangle]
+pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::lightning::chain::channelmonitor::ChannelMonitor) -> C2Tuple_ThirtyTwoBytesChannelMonitorZ {
+ C2Tuple_ThirtyTwoBytesChannelMonitorZ { a, b, }
+}
+
+#[no_mangle]
+/// Frees any resources used by the C2Tuple_ThirtyTwoBytesChannelMonitorZ.
+pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelMonitorZ_free(_res: C2Tuple_ThirtyTwoBytesChannelMonitorZ) { }
#[repr(C)]
-/// The contents of CResult_HTLCUpdateDecodeErrorZ
-pub union CResult_HTLCUpdateDecodeErrorZPtr {
+/// The contents of CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ
+pub union CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::chain::channelmonitor::HTLCUpdate,
+ pub result: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_HTLCUpdateDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::chain::channelmonitor::HTLCUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_HTLCUpdateDecodeErrorZ {
- /// The contents of this CResult_HTLCUpdateDecodeErrorZ, accessible via either
+pub struct CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
+ /// The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_HTLCUpdateDecodeErrorZPtr,
- /// Whether this CResult_HTLCUpdateDecodeErrorZ represents a success state.
+ pub contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr,
+ /// Whether this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state.
-pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_ok(o: crate::lightning::chain::channelmonitor::HTLCUpdate) -> CResult_HTLCUpdateDecodeErrorZ {
- CResult_HTLCUpdateDecodeErrorZ {
- contents: CResult_HTLCUpdateDecodeErrorZPtr {
+/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the success state.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o: crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
+ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
+ contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state.
-pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_HTLCUpdateDecodeErrorZ {
- CResult_HTLCUpdateDecodeErrorZ {
- contents: CResult_HTLCUpdateDecodeErrorZPtr {
+/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the error state.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
+ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
+ contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_is_ok(o: &CResult_HTLCUpdateDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_is_ok(o: &CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_HTLCUpdateDecodeErrorZ.
-pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_free(_res: CResult_HTLCUpdateDecodeErrorZ) { }
-impl Drop for CResult_HTLCUpdateDecodeErrorZ {
+/// Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(_res: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ) { }
+impl Drop for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::chain::channelmonitor::HTLCUpdate, crate::lightning::ln::msgs::DecodeError>> for CResult_HTLCUpdateDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::chain::channelmonitor::HTLCUpdate, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ, crate::lightning::ln::msgs::DecodeError>> for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_HTLCUpdateDecodeErrorZPtr { result }
+ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_HTLCUpdateDecodeErrorZPtr { err }
+ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_HTLCUpdateDecodeErrorZ {
+impl Clone for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_HTLCUpdateDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::chain::channelmonitor::HTLCUpdate>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_HTLCUpdateDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_HTLCUpdateDecodeErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_HTLCUpdateDecodeErrorZ_clone(orig: &CResult_HTLCUpdateDecodeErrorZ) -> CResult_HTLCUpdateDecodeErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_OutPointCVec_u8ZZ {
- /// The element at position 0
- pub a: crate::lightning::chain::transaction::OutPoint,
- /// The element at position 1
- pub b: crate::c_types::derived::CVec_u8Z,
-}
-impl From<(crate::lightning::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z)> for C2Tuple_OutPointCVec_u8ZZ {
- fn from (tup: (crate::lightning::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z)) -> Self {
- Self {
- a: tup.0,
- b: tup.1,
- }
- }
-}
-impl C2Tuple_OutPointCVec_u8ZZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::lightning::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z) {
- (self.a, self.b)
- }
-}
-impl Clone for C2Tuple_OutPointCVec_u8ZZ {
- fn clone(&self) -> Self {
- Self {
- a: Clone::clone(&self.a),
- b: Clone::clone(&self.b),
- }
- }
-}
-#[no_mangle]
-/// Creates a new tuple which has the same data as `orig`
+/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C2Tuple_OutPointCVec_u8ZZ_clone(orig: &C2Tuple_OutPointCVec_u8ZZ) -> C2Tuple_OutPointCVec_u8ZZ { Clone::clone(&orig) }
-/// Creates a new C2Tuple_OutPointCVec_u8ZZ from the contained elements.
-#[no_mangle]
-pub extern "C" fn C2Tuple_OutPointCVec_u8ZZ_new(a: crate::lightning::chain::transaction::OutPoint, b: crate::c_types::derived::CVec_u8Z) -> C2Tuple_OutPointCVec_u8ZZ {
- C2Tuple_OutPointCVec_u8ZZ { a, b, }
-}
-
-#[no_mangle]
-/// Frees any resources used by the C2Tuple_OutPointCVec_u8ZZ.
-pub extern "C" fn C2Tuple_OutPointCVec_u8ZZ_free(_res: C2Tuple_OutPointCVec_u8ZZ) { }
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_clone(orig: &CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_u32CVec_u8ZZ {
+pub struct C2Tuple_PublicKeyTypeZ {
/// The element at position 0
- pub a: u32,
+ pub a: crate::c_types::PublicKey,
/// The element at position 1
- pub b: crate::c_types::derived::CVec_u8Z,
+ pub b: crate::lightning::ln::wire::Type,
}
-impl From<(u32, crate::c_types::derived::CVec_u8Z)> for C2Tuple_u32CVec_u8ZZ {
- fn from (tup: (u32, crate::c_types::derived::CVec_u8Z)) -> Self {
+impl From<(crate::c_types::PublicKey, crate::lightning::ln::wire::Type)> for C2Tuple_PublicKeyTypeZ {
+ fn from (tup: (crate::c_types::PublicKey, crate::lightning::ln::wire::Type)) -> Self {
Self {
a: tup.0,
b: tup.1,
}
}
}
-impl C2Tuple_u32CVec_u8ZZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (u32, crate::c_types::derived::CVec_u8Z) {
+impl C2Tuple_PublicKeyTypeZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::PublicKey, crate::lightning::ln::wire::Type) {
(self.a, self.b)
}
}
-impl Clone for C2Tuple_u32CVec_u8ZZ {
+impl Clone for C2Tuple_PublicKeyTypeZ {
fn clone(&self) -> Self {
Self {
a: Clone::clone(&self.a),
#[no_mangle]
/// Creates a new tuple which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C2Tuple_u32CVec_u8ZZ_clone(orig: &C2Tuple_u32CVec_u8ZZ) -> C2Tuple_u32CVec_u8ZZ { Clone::clone(&orig) }
-/// Creates a new C2Tuple_u32CVec_u8ZZ from the contained elements.
+pub extern "C" fn C2Tuple_PublicKeyTypeZ_clone(orig: &C2Tuple_PublicKeyTypeZ) -> C2Tuple_PublicKeyTypeZ { Clone::clone(&orig) }
+/// Creates a new C2Tuple_PublicKeyTypeZ from the contained elements.
#[no_mangle]
-pub extern "C" fn C2Tuple_u32CVec_u8ZZ_new(a: u32, b: crate::c_types::derived::CVec_u8Z) -> C2Tuple_u32CVec_u8ZZ {
- C2Tuple_u32CVec_u8ZZ { a, b, }
+pub extern "C" fn C2Tuple_PublicKeyTypeZ_new(a: crate::c_types::PublicKey, b: crate::lightning::ln::wire::Type) -> C2Tuple_PublicKeyTypeZ {
+ C2Tuple_PublicKeyTypeZ { a, b, }
}
#[no_mangle]
-/// Frees any resources used by the C2Tuple_u32CVec_u8ZZ.
-pub extern "C" fn C2Tuple_u32CVec_u8ZZ_free(_res: C2Tuple_u32CVec_u8ZZ) { }
+/// Frees any resources used by the C2Tuple_PublicKeyTypeZ.
+pub extern "C" fn C2Tuple_PublicKeyTypeZ_free(_res: C2Tuple_PublicKeyTypeZ) { }
#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32CVec_u8ZZs of arbitrary size.
+/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_PublicKeyTypeZs of arbitrary size.
/// This corresponds to std::vector in C++
-pub struct CVec_C2Tuple_u32CVec_u8ZZZ {
+pub struct CVec_C2Tuple_PublicKeyTypeZZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::derived::C2Tuple_u32CVec_u8ZZ,
+ pub data: *mut crate::c_types::derived::C2Tuple_PublicKeyTypeZ,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
-impl CVec_C2Tuple_u32CVec_u8ZZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_u32CVec_u8ZZ> {
+impl CVec_C2Tuple_PublicKeyTypeZZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_PublicKeyTypeZ> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_u32CVec_u8ZZ] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_PublicKeyTypeZ] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::derived::C2Tuple_u32CVec_u8ZZ>> for CVec_C2Tuple_u32CVec_u8ZZZ {
- fn from(v: Vec<crate::c_types::derived::C2Tuple_u32CVec_u8ZZ>) -> Self {
+impl From<Vec<crate::c_types::derived::C2Tuple_PublicKeyTypeZ>> for CVec_C2Tuple_PublicKeyTypeZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_PublicKeyTypeZ>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
#[no_mangle]
/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_C2Tuple_u32CVec_u8ZZZ_free(_res: CVec_C2Tuple_u32CVec_u8ZZZ) { }
-impl Drop for CVec_C2Tuple_u32CVec_u8ZZZ {
+pub extern "C" fn CVec_C2Tuple_PublicKeyTypeZZ_free(_res: CVec_C2Tuple_PublicKeyTypeZZ) { }
+impl Drop for CVec_C2Tuple_PublicKeyTypeZZ {
fn drop(&mut self) {
if self.datalen == 0 { return; }
let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CVec_C2Tuple_u32CVec_u8ZZZ {
+impl Clone for CVec_C2Tuple_PublicKeyTypeZZ {
fn clone(&self) -> Self {
let mut res = Vec::new();
if self.datalen == 0 { return Self::from(res); }
}
#[repr(C)]
/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
+pub struct C2Tuple_PublicKeyCVec_SocketAddressZZ {
/// The element at position 0
- pub a: crate::c_types::ThirtyTwoBytes,
+ pub a: crate::c_types::PublicKey,
/// The element at position 1
- pub b: crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ,
+ pub b: crate::c_types::derived::CVec_SocketAddressZ,
}
-impl From<(crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ)> for C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
- fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ)) -> Self {
+impl From<(crate::c_types::PublicKey, crate::c_types::derived::CVec_SocketAddressZ)> for C2Tuple_PublicKeyCVec_SocketAddressZZ {
+ fn from (tup: (crate::c_types::PublicKey, crate::c_types::derived::CVec_SocketAddressZ)) -> Self {
Self {
a: tup.0,
b: tup.1,
}
}
}
-impl C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ) {
+impl C2Tuple_PublicKeyCVec_SocketAddressZZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::PublicKey, crate::c_types::derived::CVec_SocketAddressZ) {
(self.a, self.b)
}
}
-impl Clone for C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
+impl Clone for C2Tuple_PublicKeyCVec_SocketAddressZZ {
fn clone(&self) -> Self {
Self {
a: Clone::clone(&self.a),
#[no_mangle]
/// Creates a new tuple which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_clone(orig: &C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ) -> C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ { Clone::clone(&orig) }
-/// Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ from the contained elements.
+pub extern "C" fn C2Tuple_PublicKeyCVec_SocketAddressZZ_clone(orig: &C2Tuple_PublicKeyCVec_SocketAddressZZ) -> C2Tuple_PublicKeyCVec_SocketAddressZZ { Clone::clone(&orig) }
+/// Creates a new C2Tuple_PublicKeyCVec_SocketAddressZZ from the contained elements.
#[no_mangle]
-pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::c_types::derived::CVec_C2Tuple_u32CVec_u8ZZZ) -> C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ {
- C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ { a, b, }
+pub extern "C" fn C2Tuple_PublicKeyCVec_SocketAddressZZ_new(a: crate::c_types::PublicKey, b: crate::c_types::derived::CVec_SocketAddressZ) -> C2Tuple_PublicKeyCVec_SocketAddressZZ {
+ C2Tuple_PublicKeyCVec_SocketAddressZZ { a, b, }
}
#[no_mangle]
-/// Frees any resources used by the C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ.
-pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ_free(_res: C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ) { }
+/// Frees any resources used by the C2Tuple_PublicKeyCVec_SocketAddressZZ.
+pub extern "C" fn C2Tuple_PublicKeyCVec_SocketAddressZZ_free(_res: C2Tuple_PublicKeyCVec_SocketAddressZZ) { }
#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZs of arbitrary size.
+/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZs of arbitrary size.
/// This corresponds to std::vector in C++
-pub struct CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
+pub struct CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ,
+ pub data: *mut crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
-impl CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ> {
+impl CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ>> for CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
- fn from(v: Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZ>) -> Self {
+impl From<Vec<crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ>> for CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
#[no_mangle]
/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ_free(_res: CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ) { }
-impl Drop for CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
+pub extern "C" fn CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ_free(_res: CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ) { }
+impl Drop for CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
fn drop(&mut self) {
if self.datalen == 0 { return; }
let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CVec_C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32CVec_u8ZZZZZ {
+impl Clone for CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
fn clone(&self) -> Self {
let mut res = Vec::new();
if self.datalen == 0 { return Self::from(res); }
}
}
#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::ln::chan_utils::CommitmentTransactions of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_CommitmentTransactionZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::ln::chan_utils::CommitmentTransaction,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::onion_message::packet::OnionMessageContents or not
+pub enum COption_OnionMessageContentsZ {
+ /// When we're in this state, this COption_OnionMessageContentsZ contains a crate::lightning::onion_message::packet::OnionMessageContents
+ Some(crate::lightning::onion_message::packet::OnionMessageContents),
+ /// When we're in this state, this COption_OnionMessageContentsZ contains nothing
+ None
}
-impl CVec_CommitmentTransactionZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::chan_utils::CommitmentTransaction> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
+impl COption_OnionMessageContentsZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::chan_utils::CommitmentTransaction] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::onion_message::packet::OnionMessageContents {
+ if let Self::Some(v) = self { v } else { unreachable!() }
}
}
-impl From<Vec<crate::lightning::ln::chan_utils::CommitmentTransaction>> for CVec_CommitmentTransactionZ {
- fn from(v: Vec<crate::lightning::ln::chan_utils::CommitmentTransaction>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+#[no_mangle]
+/// Constructs a new COption_OnionMessageContentsZ containing a crate::lightning::onion_message::packet::OnionMessageContents
+pub extern "C" fn COption_OnionMessageContentsZ_some(o: crate::lightning::onion_message::packet::OnionMessageContents) -> COption_OnionMessageContentsZ {
+ COption_OnionMessageContentsZ::Some(o)
+}
+#[no_mangle]
+/// Constructs a new COption_OnionMessageContentsZ containing nothing
+pub extern "C" fn COption_OnionMessageContentsZ_none() -> COption_OnionMessageContentsZ {
+ COption_OnionMessageContentsZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the crate::lightning::onion_message::packet::OnionMessageContents, if we are in the Some state
+pub extern "C" fn COption_OnionMessageContentsZ_free(_res: COption_OnionMessageContentsZ) { }
+#[no_mangle]
+/// Creates a new COption_OnionMessageContentsZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_OnionMessageContentsZ_clone(orig: &COption_OnionMessageContentsZ) -> COption_OnionMessageContentsZ { Clone::clone(&orig) }
+#[repr(C)]
+/// The contents of CResult_COption_OnionMessageContentsZDecodeErrorZ
+pub union CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::c_types::derived::COption_OnionMessageContentsZ,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
+}
+#[repr(C)]
+/// A CResult_COption_OnionMessageContentsZDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::COption_OnionMessageContentsZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_COption_OnionMessageContentsZDecodeErrorZ {
+ /// The contents of this CResult_COption_OnionMessageContentsZDecodeErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr,
+ /// Whether this CResult_COption_OnionMessageContentsZDecodeErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ in the success state.
+pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_ok(o: crate::c_types::derived::COption_OnionMessageContentsZ) -> CResult_COption_OnionMessageContentsZDecodeErrorZ {
+ CResult_COption_OnionMessageContentsZDecodeErrorZ {
+ contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
}
}
#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_CommitmentTransactionZ_free(_res: CVec_CommitmentTransactionZ) { }
-impl Drop for CVec_CommitmentTransactionZ {
+/// Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ in the error state.
+pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_OnionMessageContentsZDecodeErrorZ {
+ CResult_COption_OnionMessageContentsZDecodeErrorZ {
+ contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
+ }
+}
+/// Checks if the given object is currently in the success state
+#[no_mangle]
+pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok(o: &CResult_COption_OnionMessageContentsZDecodeErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_COption_OnionMessageContentsZDecodeErrorZ.
+pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_free(_res: CResult_COption_OnionMessageContentsZDecodeErrorZ) { }
+impl Drop for CResult_COption_OnionMessageContentsZDecodeErrorZ {
fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
+ }
}
}
-impl Clone for CVec_CommitmentTransactionZ {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_OnionMessageContentsZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_OnionMessageContentsZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_OnionMessageContentsZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_COption_OnionMessageContentsZDecodeErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_COption_OnionMessageContentsZDecodeErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
+ }
+}
+impl Clone for CResult_COption_OnionMessageContentsZDecodeErrorZ {
fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::COption_OnionMessageContentsZ>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
}
}
+#[no_mangle]
+/// Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_clone(orig: &CResult_COption_OnionMessageContentsZDecodeErrorZ) -> CResult_COption_OnionMessageContentsZDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_u32TxOutZ {
+/// A tuple of 3 elements. See the individual fields for the types contained.
+pub struct C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
/// The element at position 0
- pub a: u32,
+ pub a: crate::lightning::onion_message::packet::OnionMessageContents,
/// The element at position 1
- pub b: crate::c_types::TxOut,
-}
-impl From<(u32, crate::c_types::TxOut)> for C2Tuple_u32TxOutZ {
- fn from (tup: (u32, crate::c_types::TxOut)) -> Self {
+ pub b: crate::lightning::onion_message::messenger::Destination,
+ /// The element at position 2
+ pub c: crate::lightning::blinded_path::BlindedPath,
+}
+impl From<(crate::lightning::onion_message::packet::OnionMessageContents, crate::lightning::onion_message::messenger::Destination, crate::lightning::blinded_path::BlindedPath)> for C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
+ fn from (tup: (crate::lightning::onion_message::packet::OnionMessageContents, crate::lightning::onion_message::messenger::Destination, crate::lightning::blinded_path::BlindedPath)) -> Self {
Self {
a: tup.0,
b: tup.1,
+ c: tup.2,
}
}
}
-impl C2Tuple_u32TxOutZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (u32, crate::c_types::TxOut) {
- (self.a, self.b)
+impl C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
+ #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::lightning::onion_message::packet::OnionMessageContents, crate::lightning::onion_message::messenger::Destination, crate::lightning::blinded_path::BlindedPath) {
+ (self.a, self.b, self.c)
}
}
-impl Clone for C2Tuple_u32TxOutZ {
+impl Clone for C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
fn clone(&self) -> Self {
Self {
a: Clone::clone(&self.a),
b: Clone::clone(&self.b),
+ c: Clone::clone(&self.c),
}
}
}
#[no_mangle]
/// Creates a new tuple which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C2Tuple_u32TxOutZ_clone(orig: &C2Tuple_u32TxOutZ) -> C2Tuple_u32TxOutZ { Clone::clone(&orig) }
-/// Creates a new C2Tuple_u32TxOutZ from the contained elements.
+pub extern "C" fn C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone(orig: &C3Tuple_OnionMessageContentsDestinationBlindedPathZ) -> C3Tuple_OnionMessageContentsDestinationBlindedPathZ { Clone::clone(&orig) }
+/// Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements.
#[no_mangle]
-pub extern "C" fn C2Tuple_u32TxOutZ_new(a: u32, b: crate::c_types::TxOut) -> C2Tuple_u32TxOutZ {
- C2Tuple_u32TxOutZ { a, b, }
+pub extern "C" fn C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a: crate::lightning::onion_message::packet::OnionMessageContents, b: crate::lightning::onion_message::messenger::Destination, c: crate::lightning::blinded_path::BlindedPath) -> C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
+ C3Tuple_OnionMessageContentsDestinationBlindedPathZ { a, b, c, }
}
#[no_mangle]
-/// Frees any resources used by the C2Tuple_u32TxOutZ.
-pub extern "C" fn C2Tuple_u32TxOutZ_free(_res: C2Tuple_u32TxOutZ) { }
+/// Frees any resources used by the C3Tuple_OnionMessageContentsDestinationBlindedPathZ.
+pub extern "C" fn C3Tuple_OnionMessageContentsDestinationBlindedPathZ_free(_res: C3Tuple_OnionMessageContentsDestinationBlindedPathZ) { }
#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32TxOutZs of arbitrary size.
+/// A dynamically-allocated array of crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZs of arbitrary size.
/// This corresponds to std::vector in C++
-pub struct CVec_C2Tuple_u32TxOutZZ {
+pub struct CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::derived::C2Tuple_u32TxOutZ,
+ pub data: *mut crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
-impl CVec_C2Tuple_u32TxOutZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_u32TxOutZ> {
+impl CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_u32TxOutZ] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::derived::C2Tuple_u32TxOutZ>> for CVec_C2Tuple_u32TxOutZZ {
- fn from(v: Vec<crate::c_types::derived::C2Tuple_u32TxOutZ>) -> Self {
+impl From<Vec<crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ>> for CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
+ fn from(v: Vec<crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
#[no_mangle]
/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_C2Tuple_u32TxOutZZ_free(_res: CVec_C2Tuple_u32TxOutZZ) { }
-impl Drop for CVec_C2Tuple_u32TxOutZZ {
+pub extern "C" fn CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ_free(_res: CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ) { }
+impl Drop for CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
fn drop(&mut self) {
if self.datalen == 0 { return; }
let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CVec_C2Tuple_u32TxOutZZ {
+impl Clone for CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
fn clone(&self) -> Self {
let mut res = Vec::new();
if self.datalen == 0 { return Self::from(res); }
}
}
#[repr(C)]
-/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
- /// The element at position 0
- pub a: crate::c_types::ThirtyTwoBytes,
- /// The element at position 1
- pub b: crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ,
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::ln::wire::Type or not
+pub enum COption_TypeZ {
+ /// When we're in this state, this COption_TypeZ contains a crate::lightning::ln::wire::Type
+ Some(crate::lightning::ln::wire::Type),
+ /// When we're in this state, this COption_TypeZ contains nothing
+ None
}
-impl From<(crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ)> for C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
- fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ)) -> Self {
- Self {
- a: tup.0,
- b: tup.1,
- }
+impl COption_TypeZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
}
-}
-impl C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ) {
- (self.a, self.b)
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
}
-}
-impl Clone for C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
- fn clone(&self) -> Self {
- Self {
- a: Clone::clone(&self.a),
- b: Clone::clone(&self.b),
- }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::ln::wire::Type {
+ if let Self::Some(v) = self { v } else { unreachable!() }
}
}
#[no_mangle]
-/// Creates a new tuple which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_clone(orig: &C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ) -> C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ { Clone::clone(&orig) }
-/// Creates a new C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ from the contained elements.
+/// Constructs a new COption_TypeZ containing a crate::lightning::ln::wire::Type
+pub extern "C" fn COption_TypeZ_some(o: crate::lightning::ln::wire::Type) -> COption_TypeZ {
+ COption_TypeZ::Some(o)
+}
#[no_mangle]
-pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::c_types::derived::CVec_C2Tuple_u32TxOutZZ) -> C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ {
- C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ { a, b, }
+/// Constructs a new COption_TypeZ containing nothing
+pub extern "C" fn COption_TypeZ_none() -> COption_TypeZ {
+ COption_TypeZ::None
}
-
#[no_mangle]
-/// Frees any resources used by the C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ.
-pub extern "C" fn C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ_free(_res: C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ) { }
+/// Frees any resources associated with the crate::lightning::ln::wire::Type, if we are in the Some state
+pub extern "C" fn COption_TypeZ_free(_res: COption_TypeZ) { }
+#[no_mangle]
+/// Creates a new COption_TypeZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_TypeZ_clone(orig: &COption_TypeZ) -> COption_TypeZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZs of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_TransactionOutputsZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
+/// The contents of CResult_COption_TypeZDecodeErrorZ
+pub union CResult_COption_TypeZDecodeErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::c_types::derived::COption_TypeZ,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
-impl CVec_TransactionOutputsZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+#[repr(C)]
+/// A CResult_COption_TypeZDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::COption_TypeZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_COption_TypeZDecodeErrorZ {
+ /// The contents of this CResult_COption_TypeZDecodeErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_COption_TypeZDecodeErrorZPtr,
+ /// Whether this CResult_COption_TypeZDecodeErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_COption_TypeZDecodeErrorZ in the success state.
+pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_ok(o: crate::c_types::derived::COption_TypeZ) -> CResult_COption_TypeZDecodeErrorZ {
+ CResult_COption_TypeZDecodeErrorZ {
+ contents: CResult_COption_TypeZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
}
}
-impl From<Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ>> for CVec_TransactionOutputsZ {
- fn from(v: Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesCVec_C2Tuple_u32TxOutZZZ>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+#[no_mangle]
+/// Creates a new CResult_COption_TypeZDecodeErrorZ in the error state.
+pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_TypeZDecodeErrorZ {
+ CResult_COption_TypeZDecodeErrorZ {
+ contents: CResult_COption_TypeZDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
}
}
+/// Checks if the given object is currently in the success state
#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_TransactionOutputsZ_free(_res: CVec_TransactionOutputsZ) { }
-impl Drop for CVec_TransactionOutputsZ {
+pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_is_ok(o: &CResult_COption_TypeZDecodeErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_COption_TypeZDecodeErrorZ.
+pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_free(_res: CResult_COption_TypeZDecodeErrorZ) { }
+impl Drop for CResult_COption_TypeZDecodeErrorZ {
fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
+ }
}
}
-impl Clone for CVec_TransactionOutputsZ {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_TypeZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_TypeZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_TypeZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_COption_TypeZDecodeErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_COption_TypeZDecodeErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
+ }
+}
+impl Clone for CResult_COption_TypeZDecodeErrorZ {
fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_COption_TypeZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::COption_TypeZ>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_COption_TypeZDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_COption_TypeZDecodeErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_clone(orig: &CResult_COption_TypeZDecodeErrorZ) -> CResult_COption_TypeZDecodeErrorZ { Clone::clone(&orig) }
+#[repr(C)]
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::ln::msgs::SocketAddress or not
+pub enum COption_SocketAddressZ {
+ /// When we're in this state, this COption_SocketAddressZ contains a crate::lightning::ln::msgs::SocketAddress
+ Some(crate::lightning::ln::msgs::SocketAddress),
+ /// When we're in this state, this COption_SocketAddressZ contains nothing
+ None
+}
+impl COption_SocketAddressZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::ln::msgs::SocketAddress {
+ if let Self::Some(v) = self { v } else { unreachable!() }
}
}
+#[no_mangle]
+/// Constructs a new COption_SocketAddressZ containing a crate::lightning::ln::msgs::SocketAddress
+pub extern "C" fn COption_SocketAddressZ_some(o: crate::lightning::ln::msgs::SocketAddress) -> COption_SocketAddressZ {
+ COption_SocketAddressZ::Some(o)
+}
+#[no_mangle]
+/// Constructs a new COption_SocketAddressZ containing nothing
+pub extern "C" fn COption_SocketAddressZ_none() -> COption_SocketAddressZ {
+ COption_SocketAddressZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the crate::lightning::ln::msgs::SocketAddress, if we are in the Some state
+pub extern "C" fn COption_SocketAddressZ_free(_res: COption_SocketAddressZ) { }
+#[no_mangle]
+/// Creates a new COption_SocketAddressZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_SocketAddressZ_clone(orig: &COption_SocketAddressZ) -> COption_SocketAddressZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::chain::channelmonitor::Balances of arbitrary size.
+/// A dynamically-allocated array of crate::lightning::ln::peer_handler::PeerDetailss of arbitrary size.
/// This corresponds to std::vector in C++
-pub struct CVec_BalanceZ {
+pub struct CVec_PeerDetailsZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::chain::channelmonitor::Balance,
+ pub data: *mut crate::lightning::ln::peer_handler::PeerDetails,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
-impl CVec_BalanceZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::chain::channelmonitor::Balance> {
+impl CVec_PeerDetailsZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::peer_handler::PeerDetails> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::chain::channelmonitor::Balance] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::peer_handler::PeerDetails] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::lightning::chain::channelmonitor::Balance>> for CVec_BalanceZ {
- fn from(v: Vec<crate::lightning::chain::channelmonitor::Balance>) -> Self {
+impl From<Vec<crate::lightning::ln::peer_handler::PeerDetails>> for CVec_PeerDetailsZ {
+ fn from(v: Vec<crate::lightning::ln::peer_handler::PeerDetails>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
#[no_mangle]
/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_BalanceZ_free(_res: CVec_BalanceZ) { }
-impl Drop for CVec_BalanceZ {
+pub extern "C" fn CVec_PeerDetailsZ_free(_res: CVec_PeerDetailsZ) { }
+impl Drop for CVec_PeerDetailsZ {
fn drop(&mut self) {
if self.datalen == 0 { return; }
let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CVec_BalanceZ {
+#[repr(C)]
+/// The contents of CResult_CVec_u8ZPeerHandleErrorZ
+pub union CResult_CVec_u8ZPeerHandleErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::c_types::derived::CVec_u8Z,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::ln::peer_handler::PeerHandleError,
+}
+#[repr(C)]
+/// A CResult_CVec_u8ZPeerHandleErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::CVec_u8Z on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_CVec_u8ZPeerHandleErrorZ {
+ /// The contents of this CResult_CVec_u8ZPeerHandleErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_CVec_u8ZPeerHandleErrorZPtr,
+ /// Whether this CResult_CVec_u8ZPeerHandleErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state.
+pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_ok(o: crate::c_types::derived::CVec_u8Z) -> CResult_CVec_u8ZPeerHandleErrorZ {
+ CResult_CVec_u8ZPeerHandleErrorZ {
+ contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state.
+pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_err(e: crate::lightning::ln::peer_handler::PeerHandleError) -> CResult_CVec_u8ZPeerHandleErrorZ {
+ CResult_CVec_u8ZPeerHandleErrorZ {
+ contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
+ }
+}
+/// Checks if the given object is currently in the success state
+#[no_mangle]
+pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o: &CResult_CVec_u8ZPeerHandleErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_CVec_u8ZPeerHandleErrorZ.
+pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_free(_res: CResult_CVec_u8ZPeerHandleErrorZ) { }
+impl Drop for CResult_CVec_u8ZPeerHandleErrorZ {
+ fn drop(&mut self) {
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
+ }
+ }
+}
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_u8Z, crate::lightning::ln::peer_handler::PeerHandleError>> for CResult_CVec_u8ZPeerHandleErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_u8Z, crate::lightning::ln::peer_handler::PeerHandleError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_CVec_u8ZPeerHandleErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_CVec_u8ZPeerHandleErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
+ }
+}
+impl Clone for CResult_CVec_u8ZPeerHandleErrorZ {
fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_u8Z>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::peer_handler::PeerHandleError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
}
}
+#[no_mangle]
+/// Creates a new CResult_CVec_u8ZPeerHandleErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: &CResult_CVec_u8ZPeerHandleErrorZ) -> CResult_CVec_u8ZPeerHandleErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_ThirtyTwoBytesChannelMonitorZ {
- /// The element at position 0
- pub a: crate::c_types::ThirtyTwoBytes,
- /// The element at position 1
- pub b: crate::lightning::chain::channelmonitor::ChannelMonitor,
+/// The contents of CResult_NonePeerHandleErrorZ
+pub union CResult_NonePeerHandleErrorZPtr {
+ /// Note that this value is always NULL, as there are no contents in the OK variant
+ pub result: *mut core::ffi::c_void,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::ln::peer_handler::PeerHandleError,
+}
+#[repr(C)]
+/// A CResult_NonePeerHandleErrorZ represents the result of a fallible operation,
+/// containing a () on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_NonePeerHandleErrorZ {
+ /// The contents of this CResult_NonePeerHandleErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_NonePeerHandleErrorZPtr,
+ /// Whether this CResult_NonePeerHandleErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_NonePeerHandleErrorZ in the success state.
+pub extern "C" fn CResult_NonePeerHandleErrorZ_ok() -> CResult_NonePeerHandleErrorZ {
+ CResult_NonePeerHandleErrorZ {
+ contents: CResult_NonePeerHandleErrorZPtr {
+ result: core::ptr::null_mut(),
+ },
+ result_ok: true,
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_NonePeerHandleErrorZ in the error state.
+pub extern "C" fn CResult_NonePeerHandleErrorZ_err(e: crate::lightning::ln::peer_handler::PeerHandleError) -> CResult_NonePeerHandleErrorZ {
+ CResult_NonePeerHandleErrorZ {
+ contents: CResult_NonePeerHandleErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
+ }
+}
+/// Checks if the given object is currently in the success state
+#[no_mangle]
+pub extern "C" fn CResult_NonePeerHandleErrorZ_is_ok(o: &CResult_NonePeerHandleErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_NonePeerHandleErrorZ.
+pub extern "C" fn CResult_NonePeerHandleErrorZ_free(_res: CResult_NonePeerHandleErrorZ) { }
+impl Drop for CResult_NonePeerHandleErrorZ {
+ fn drop(&mut self) {
+ if self.result_ok {
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
+ }
+ }
+}
+impl From<crate::c_types::CResultTempl<(), crate::lightning::ln::peer_handler::PeerHandleError>> for CResult_NonePeerHandleErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<(), crate::lightning::ln::peer_handler::PeerHandleError>) -> Self {
+ let contents = if o.result_ok {
+ let _ = unsafe { Box::from_raw(o.contents.result) };
+ o.contents.result = core::ptr::null_mut();
+ CResult_NonePeerHandleErrorZPtr { result: core::ptr::null_mut() }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_NonePeerHandleErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
+ }
+}
+impl Clone for CResult_NonePeerHandleErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_NonePeerHandleErrorZPtr {
+ result: core::ptr::null_mut()
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_NonePeerHandleErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::peer_handler::PeerHandleError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_NonePeerHandleErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_NonePeerHandleErrorZ_clone(orig: &CResult_NonePeerHandleErrorZ) -> CResult_NonePeerHandleErrorZ { Clone::clone(&orig) }
+#[repr(C)]
+/// The contents of CResult_boolPeerHandleErrorZ
+pub union CResult_boolPeerHandleErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut bool,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::ln::peer_handler::PeerHandleError,
+}
+#[repr(C)]
+/// A CResult_boolPeerHandleErrorZ represents the result of a fallible operation,
+/// containing a bool on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_boolPeerHandleErrorZ {
+ /// The contents of this CResult_boolPeerHandleErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_boolPeerHandleErrorZPtr,
+ /// Whether this CResult_boolPeerHandleErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_boolPeerHandleErrorZ in the success state.
+pub extern "C" fn CResult_boolPeerHandleErrorZ_ok(o: bool) -> CResult_boolPeerHandleErrorZ {
+ CResult_boolPeerHandleErrorZ {
+ contents: CResult_boolPeerHandleErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_boolPeerHandleErrorZ in the error state.
+pub extern "C" fn CResult_boolPeerHandleErrorZ_err(e: crate::lightning::ln::peer_handler::PeerHandleError) -> CResult_boolPeerHandleErrorZ {
+ CResult_boolPeerHandleErrorZ {
+ contents: CResult_boolPeerHandleErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
+ }
}
-impl From<(crate::c_types::ThirtyTwoBytes, crate::lightning::chain::channelmonitor::ChannelMonitor)> for C2Tuple_ThirtyTwoBytesChannelMonitorZ {
- fn from (tup: (crate::c_types::ThirtyTwoBytes, crate::lightning::chain::channelmonitor::ChannelMonitor)) -> Self {
- Self {
- a: tup.0,
- b: tup.1,
+/// Checks if the given object is currently in the success state
+#[no_mangle]
+pub extern "C" fn CResult_boolPeerHandleErrorZ_is_ok(o: &CResult_boolPeerHandleErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_boolPeerHandleErrorZ.
+pub extern "C" fn CResult_boolPeerHandleErrorZ_free(_res: CResult_boolPeerHandleErrorZ) { }
+impl Drop for CResult_boolPeerHandleErrorZ {
+ fn drop(&mut self) {
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
}
}
}
-impl C2Tuple_ThirtyTwoBytesChannelMonitorZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::ThirtyTwoBytes, crate::lightning::chain::channelmonitor::ChannelMonitor) {
- (self.a, self.b)
+impl From<crate::c_types::CResultTempl<bool, crate::lightning::ln::peer_handler::PeerHandleError>> for CResult_boolPeerHandleErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<bool, crate::lightning::ln::peer_handler::PeerHandleError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_boolPeerHandleErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_boolPeerHandleErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
}
}
-impl Clone for C2Tuple_ThirtyTwoBytesChannelMonitorZ {
+impl Clone for CResult_boolPeerHandleErrorZ {
fn clone(&self) -> Self {
- Self {
- a: Clone::clone(&self.a),
- b: Clone::clone(&self.b),
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_boolPeerHandleErrorZPtr {
+ result: Box::into_raw(Box::new(<bool>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_boolPeerHandleErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::peer_handler::PeerHandleError>::clone(unsafe { &*self.contents.err })))
+ } }
}
}
}
#[no_mangle]
-/// Creates a new tuple which has the same data as `orig`
+/// Creates a new CResult_boolPeerHandleErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelMonitorZ_clone(orig: &C2Tuple_ThirtyTwoBytesChannelMonitorZ) -> C2Tuple_ThirtyTwoBytesChannelMonitorZ { Clone::clone(&orig) }
-/// Creates a new C2Tuple_ThirtyTwoBytesChannelMonitorZ from the contained elements.
-#[no_mangle]
-pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelMonitorZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::lightning::chain::channelmonitor::ChannelMonitor) -> C2Tuple_ThirtyTwoBytesChannelMonitorZ {
- C2Tuple_ThirtyTwoBytesChannelMonitorZ { a, b, }
-}
-
-#[no_mangle]
-/// Frees any resources used by the C2Tuple_ThirtyTwoBytesChannelMonitorZ.
-pub extern "C" fn C2Tuple_ThirtyTwoBytesChannelMonitorZ_free(_res: C2Tuple_ThirtyTwoBytesChannelMonitorZ) { }
+pub extern "C" fn CResult_boolPeerHandleErrorZ_clone(orig: &CResult_boolPeerHandleErrorZ) -> CResult_boolPeerHandleErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ
-pub union CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
+/// The contents of CResult_u32GraphSyncErrorZ
+pub union CResult_u32GraphSyncErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ,
+ pub result: *mut u32,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::DecodeError,
+ pub err: *mut crate::lightning_rapid_gossip_sync::GraphSyncError,
}
#[repr(C)]
-/// A CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_u32GraphSyncErrorZ represents the result of a fallible operation,
+/// containing a u32 on success and a crate::lightning_rapid_gossip_sync::GraphSyncError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
- /// The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ, accessible via either
+pub struct CResult_u32GraphSyncErrorZ {
+ /// The contents of this CResult_u32GraphSyncErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr,
- /// Whether this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ represents a success state.
+ pub contents: CResult_u32GraphSyncErrorZPtr,
+ /// Whether this CResult_u32GraphSyncErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the success state.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_ok(o: crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
- CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
- contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
+/// Creates a new CResult_u32GraphSyncErrorZ in the success state.
+pub extern "C" fn CResult_u32GraphSyncErrorZ_ok(o: u32) -> CResult_u32GraphSyncErrorZ {
+ CResult_u32GraphSyncErrorZ {
+ contents: CResult_u32GraphSyncErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ in the error state.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
- CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
- contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
+/// Creates a new CResult_u32GraphSyncErrorZ in the error state.
+pub extern "C" fn CResult_u32GraphSyncErrorZ_err(e: crate::lightning_rapid_gossip_sync::GraphSyncError) -> CResult_u32GraphSyncErrorZ {
+ CResult_u32GraphSyncErrorZ {
+ contents: CResult_u32GraphSyncErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_is_ok(o: &CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_u32GraphSyncErrorZ_is_ok(o: &CResult_u32GraphSyncErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_free(_res: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ) { }
-impl Drop for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
+/// Frees any resources used by the CResult_u32GraphSyncErrorZ.
+pub extern "C" fn CResult_u32GraphSyncErrorZ_free(_res: CResult_u32GraphSyncErrorZ) { }
+impl Drop for CResult_u32GraphSyncErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ, crate::lightning::ln::msgs::DecodeError>> for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<u32, crate::lightning_rapid_gossip_sync::GraphSyncError>> for CResult_u32GraphSyncErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<u32, crate::lightning_rapid_gossip_sync::GraphSyncError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr { result }
+ CResult_u32GraphSyncErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr { err }
+ CResult_u32GraphSyncErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ {
- fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ>::clone(unsafe { &*self.contents.result })))
- } }
- } else {
- Self { result_ok: false, contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
- } }
- }
+#[repr(C)]
+/// The contents of CResult_CVec_u8ZIOErrorZ
+pub union CResult_CVec_u8ZIOErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::c_types::derived::CVec_u8Z,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::c_types::IOError,
+}
+#[repr(C)]
+/// A CResult_CVec_u8ZIOErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::CVec_u8Z on success and a crate::c_types::IOError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_CVec_u8ZIOErrorZ {
+ /// The contents of this CResult_CVec_u8ZIOErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_CVec_u8ZIOErrorZPtr,
+ /// Whether this CResult_CVec_u8ZIOErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_CVec_u8ZIOErrorZ in the success state.
+pub extern "C" fn CResult_CVec_u8ZIOErrorZ_ok(o: crate::c_types::derived::CVec_u8Z) -> CResult_CVec_u8ZIOErrorZ {
+ CResult_CVec_u8ZIOErrorZ {
+ contents: CResult_CVec_u8ZIOErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ_clone(orig: &CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZDecodeErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_PublicKeyTypeZ {
- /// The element at position 0
- pub a: crate::c_types::PublicKey,
- /// The element at position 1
- pub b: crate::lightning::ln::wire::Type,
+/// Creates a new CResult_CVec_u8ZIOErrorZ in the error state.
+pub extern "C" fn CResult_CVec_u8ZIOErrorZ_err(e: crate::c_types::IOError) -> CResult_CVec_u8ZIOErrorZ {
+ CResult_CVec_u8ZIOErrorZ {
+ contents: CResult_CVec_u8ZIOErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
+ }
}
-impl From<(crate::c_types::PublicKey, crate::lightning::ln::wire::Type)> for C2Tuple_PublicKeyTypeZ {
- fn from (tup: (crate::c_types::PublicKey, crate::lightning::ln::wire::Type)) -> Self {
- Self {
- a: tup.0,
- b: tup.1,
+/// Checks if the given object is currently in the success state
+#[no_mangle]
+pub extern "C" fn CResult_CVec_u8ZIOErrorZ_is_ok(o: &CResult_CVec_u8ZIOErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_CVec_u8ZIOErrorZ.
+pub extern "C" fn CResult_CVec_u8ZIOErrorZ_free(_res: CResult_CVec_u8ZIOErrorZ) { }
+impl Drop for CResult_CVec_u8ZIOErrorZ {
+ fn drop(&mut self) {
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
}
}
}
-impl C2Tuple_PublicKeyTypeZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::PublicKey, crate::lightning::ln::wire::Type) {
- (self.a, self.b)
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_u8Z, crate::c_types::IOError>> for CResult_CVec_u8ZIOErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_u8Z, crate::c_types::IOError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_CVec_u8ZIOErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_CVec_u8ZIOErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
}
}
-impl Clone for C2Tuple_PublicKeyTypeZ {
+impl Clone for CResult_CVec_u8ZIOErrorZ {
fn clone(&self) -> Self {
- Self {
- a: Clone::clone(&self.a),
- b: Clone::clone(&self.b),
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_CVec_u8ZIOErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_u8Z>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_CVec_u8ZIOErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::c_types::IOError>::clone(unsafe { &*self.contents.err })))
+ } }
}
}
}
#[no_mangle]
-/// Creates a new tuple which has the same data as `orig`
+/// Creates a new CResult_CVec_u8ZIOErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C2Tuple_PublicKeyTypeZ_clone(orig: &C2Tuple_PublicKeyTypeZ) -> C2Tuple_PublicKeyTypeZ { Clone::clone(&orig) }
-/// Creates a new C2Tuple_PublicKeyTypeZ from the contained elements.
-#[no_mangle]
-pub extern "C" fn C2Tuple_PublicKeyTypeZ_new(a: crate::c_types::PublicKey, b: crate::lightning::ln::wire::Type) -> C2Tuple_PublicKeyTypeZ {
- C2Tuple_PublicKeyTypeZ { a, b, }
-}
-
-#[no_mangle]
-/// Frees any resources used by the C2Tuple_PublicKeyTypeZ.
-pub extern "C" fn C2Tuple_PublicKeyTypeZ_free(_res: C2Tuple_PublicKeyTypeZ) { }
+pub extern "C" fn CResult_CVec_u8ZIOErrorZ_clone(orig: &CResult_CVec_u8ZIOErrorZ) -> CResult_CVec_u8ZIOErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_PublicKeyTypeZs of arbitrary size.
+/// A dynamically-allocated array of crate::c_types::Strs of arbitrary size.
/// This corresponds to std::vector in C++
-pub struct CVec_C2Tuple_PublicKeyTypeZZ {
+pub struct CVec_StrZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::derived::C2Tuple_PublicKeyTypeZ,
+ pub data: *mut crate::c_types::Str,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
-impl CVec_C2Tuple_PublicKeyTypeZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_PublicKeyTypeZ> {
+impl CVec_StrZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::Str> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_PublicKeyTypeZ] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::Str] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::derived::C2Tuple_PublicKeyTypeZ>> for CVec_C2Tuple_PublicKeyTypeZZ {
- fn from(v: Vec<crate::c_types::derived::C2Tuple_PublicKeyTypeZ>) -> Self {
+impl From<Vec<crate::c_types::Str>> for CVec_StrZ {
+ fn from(v: Vec<crate::c_types::Str>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
#[no_mangle]
/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_C2Tuple_PublicKeyTypeZZ_free(_res: CVec_C2Tuple_PublicKeyTypeZZ) { }
-impl Drop for CVec_C2Tuple_PublicKeyTypeZZ {
+pub extern "C" fn CVec_StrZ_free(_res: CVec_StrZ) { }
+impl Drop for CVec_StrZ {
fn drop(&mut self) {
if self.datalen == 0 { return; }
let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CVec_C2Tuple_PublicKeyTypeZZ {
+impl Clone for CVec_StrZ {
fn clone(&self) -> Self {
let mut res = Vec::new();
if self.datalen == 0 { return Self::from(res); }
}
}
#[repr(C)]
-/// A tuple of 2 elements. See the individual fields for the types contained.
-pub struct C2Tuple_PublicKeyCVec_SocketAddressZZ {
- /// The element at position 0
- pub a: crate::c_types::PublicKey,
- /// The element at position 1
- pub b: crate::c_types::derived::CVec_SocketAddressZ,
+/// The contents of CResult_CVec_StrZIOErrorZ
+pub union CResult_CVec_StrZIOErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::c_types::derived::CVec_StrZ,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::c_types::IOError,
}
-impl From<(crate::c_types::PublicKey, crate::c_types::derived::CVec_SocketAddressZ)> for C2Tuple_PublicKeyCVec_SocketAddressZZ {
- fn from (tup: (crate::c_types::PublicKey, crate::c_types::derived::CVec_SocketAddressZ)) -> Self {
- Self {
- a: tup.0,
- b: tup.1,
+#[repr(C)]
+/// A CResult_CVec_StrZIOErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::CVec_StrZ on success and a crate::c_types::IOError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_CVec_StrZIOErrorZ {
+ /// The contents of this CResult_CVec_StrZIOErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_CVec_StrZIOErrorZPtr,
+ /// Whether this CResult_CVec_StrZIOErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_CVec_StrZIOErrorZ in the success state.
+pub extern "C" fn CResult_CVec_StrZIOErrorZ_ok(o: crate::c_types::derived::CVec_StrZ) -> CResult_CVec_StrZIOErrorZ {
+ CResult_CVec_StrZIOErrorZ {
+ contents: CResult_CVec_StrZIOErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_CVec_StrZIOErrorZ in the error state.
+pub extern "C" fn CResult_CVec_StrZIOErrorZ_err(e: crate::c_types::IOError) -> CResult_CVec_StrZIOErrorZ {
+ CResult_CVec_StrZIOErrorZ {
+ contents: CResult_CVec_StrZIOErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
+ }
+}
+/// Checks if the given object is currently in the success state
+#[no_mangle]
+pub extern "C" fn CResult_CVec_StrZIOErrorZ_is_ok(o: &CResult_CVec_StrZIOErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_CVec_StrZIOErrorZ.
+pub extern "C" fn CResult_CVec_StrZIOErrorZ_free(_res: CResult_CVec_StrZIOErrorZ) { }
+impl Drop for CResult_CVec_StrZIOErrorZ {
+ fn drop(&mut self) {
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
}
}
}
-impl C2Tuple_PublicKeyCVec_SocketAddressZZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::c_types::PublicKey, crate::c_types::derived::CVec_SocketAddressZ) {
- (self.a, self.b)
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_StrZ, crate::c_types::IOError>> for CResult_CVec_StrZIOErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_StrZ, crate::c_types::IOError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_CVec_StrZIOErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_CVec_StrZIOErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
}
}
-impl Clone for C2Tuple_PublicKeyCVec_SocketAddressZZ {
+impl Clone for CResult_CVec_StrZIOErrorZ {
fn clone(&self) -> Self {
- Self {
- a: Clone::clone(&self.a),
- b: Clone::clone(&self.b),
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_CVec_StrZIOErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_StrZ>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_CVec_StrZIOErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::c_types::IOError>::clone(unsafe { &*self.contents.err })))
+ } }
}
}
}
#[no_mangle]
-/// Creates a new tuple which has the same data as `orig`
+/// Creates a new CResult_CVec_StrZIOErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C2Tuple_PublicKeyCVec_SocketAddressZZ_clone(orig: &C2Tuple_PublicKeyCVec_SocketAddressZZ) -> C2Tuple_PublicKeyCVec_SocketAddressZZ { Clone::clone(&orig) }
-/// Creates a new C2Tuple_PublicKeyCVec_SocketAddressZZ from the contained elements.
-#[no_mangle]
-pub extern "C" fn C2Tuple_PublicKeyCVec_SocketAddressZZ_new(a: crate::c_types::PublicKey, b: crate::c_types::derived::CVec_SocketAddressZ) -> C2Tuple_PublicKeyCVec_SocketAddressZZ {
- C2Tuple_PublicKeyCVec_SocketAddressZZ { a, b, }
-}
-
-#[no_mangle]
-/// Frees any resources used by the C2Tuple_PublicKeyCVec_SocketAddressZZ.
-pub extern "C" fn C2Tuple_PublicKeyCVec_SocketAddressZZ_free(_res: C2Tuple_PublicKeyCVec_SocketAddressZZ) { }
+pub extern "C" fn CResult_CVec_StrZIOErrorZ_clone(orig: &CResult_CVec_StrZIOErrorZ) -> CResult_CVec_StrZIOErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZs of arbitrary size.
+/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZs of arbitrary size.
/// This corresponds to std::vector in C++
-pub struct CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
+pub struct CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ,
+ pub data: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
-impl CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ> {
+impl CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ>> for CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
- fn from(v: Vec<crate::c_types::derived::C2Tuple_PublicKeyCVec_SocketAddressZZ>) -> Self {
+impl From<Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ>> for CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
+ fn from(v: Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
#[no_mangle]
/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ_free(_res: CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ) { }
-impl Drop for CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
+pub extern "C" fn CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_free(_res: CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ) { }
+impl Drop for CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
fn drop(&mut self) {
if self.datalen == 0 { return; }
let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CVec_C2Tuple_PublicKeyCVec_SocketAddressZZZ {
+impl Clone for CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
fn clone(&self) -> Self {
let mut res = Vec::new();
if self.datalen == 0 { return Self::from(res); }
}
}
#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a crate::lightning::onion_message::packet::OnionMessageContents or not
-pub enum COption_OnionMessageContentsZ {
- /// When we're in this state, this COption_OnionMessageContentsZ contains a crate::lightning::onion_message::packet::OnionMessageContents
- Some(crate::lightning::onion_message::packet::OnionMessageContents),
- /// When we're in this state, this COption_OnionMessageContentsZ contains nothing
- None
+/// The contents of CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ
+pub union CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::c_types::IOError,
}
-impl COption_OnionMessageContentsZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
- }
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
- }
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::onion_message::packet::OnionMessageContents {
- if let Self::Some(v) = self { v } else { unreachable!() }
+#[repr(C)]
+/// A CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ on success and a crate::c_types::IOError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+ /// The contents of this CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr,
+ /// Whether this CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the success state.
+pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(o: crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ) -> CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+ contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
}
}
#[no_mangle]
-/// Constructs a new COption_OnionMessageContentsZ containing a crate::lightning::onion_message::packet::OnionMessageContents
-pub extern "C" fn COption_OnionMessageContentsZ_some(o: crate::lightning::onion_message::packet::OnionMessageContents) -> COption_OnionMessageContentsZ {
- COption_OnionMessageContentsZ::Some(o)
+/// Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the error state.
+pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_err(e: crate::c_types::IOError) -> CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+ contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
+ }
}
+/// Checks if the given object is currently in the success state
#[no_mangle]
-/// Constructs a new COption_OnionMessageContentsZ containing nothing
-pub extern "C" fn COption_OnionMessageContentsZ_none() -> COption_OnionMessageContentsZ {
- COption_OnionMessageContentsZ::None
+pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_is_ok(o: &CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ) -> bool {
+ o.result_ok
}
#[no_mangle]
-/// Frees any resources associated with the crate::lightning::onion_message::packet::OnionMessageContents, if we are in the Some state
-pub extern "C" fn COption_OnionMessageContentsZ_free(_res: COption_OnionMessageContentsZ) { }
+/// Frees any resources used by the CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.
+pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(_res: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ) { }
+impl Drop for CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+ fn drop(&mut self) {
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
+ }
+ }
+}
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ, crate::c_types::IOError>> for CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ, crate::c_types::IOError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
+ }
+}
+impl Clone for CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::c_types::IOError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
#[no_mangle]
-/// Creates a new COption_OnionMessageContentsZ which has the same data as `orig`
+/// Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_OnionMessageContentsZ_clone(orig: &COption_OnionMessageContentsZ) -> COption_OnionMessageContentsZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_clone(orig: &CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ) -> CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_COption_OnionMessageContentsZDecodeErrorZ
-pub union CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
+/// The contents of CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ
+pub union CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::COption_OnionMessageContentsZ,
+ pub result: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::DecodeError,
+ pub err: *mut crate::c_types::IOError,
}
#[repr(C)]
-/// A CResult_COption_OnionMessageContentsZDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::COption_OnionMessageContentsZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ on success and a crate::c_types::IOError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_COption_OnionMessageContentsZDecodeErrorZ {
- /// The contents of this CResult_COption_OnionMessageContentsZDecodeErrorZ, accessible via either
+pub struct CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
+ /// The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr,
- /// Whether this CResult_COption_OnionMessageContentsZDecodeErrorZ represents a success state.
+ pub contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr,
+ /// Whether this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ in the success state.
-pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_ok(o: crate::c_types::derived::COption_OnionMessageContentsZ) -> CResult_COption_OnionMessageContentsZDecodeErrorZ {
- CResult_COption_OnionMessageContentsZDecodeErrorZ {
- contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
+/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o: crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
+ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
+ contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ in the error state.
-pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_OnionMessageContentsZDecodeErrorZ {
- CResult_COption_OnionMessageContentsZDecodeErrorZ {
- contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
+/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the error state.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_err(e: crate::c_types::IOError) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
+ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
+ contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_is_ok(o: &CResult_COption_OnionMessageContentsZDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_is_ok(o: &CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_COption_OnionMessageContentsZDecodeErrorZ.
-pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_free(_res: CResult_COption_OnionMessageContentsZDecodeErrorZ) { }
-impl Drop for CResult_COption_OnionMessageContentsZDecodeErrorZ {
+/// Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(_res: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ) { }
+impl Drop for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_OnionMessageContentsZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_OnionMessageContentsZDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_OnionMessageContentsZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ, crate::c_types::IOError>> for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ, crate::c_types::IOError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_COption_OnionMessageContentsZDecodeErrorZPtr { result }
+ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_COption_OnionMessageContentsZDecodeErrorZPtr { err }
+ CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_COption_OnionMessageContentsZDecodeErrorZ {
+impl Clone for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::COption_OnionMessageContentsZ>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_COption_OnionMessageContentsZDecodeErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::c_types::IOError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_COption_OnionMessageContentsZDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_COption_OnionMessageContentsZDecodeErrorZ_clone(orig: &CResult_COption_OnionMessageContentsZDecodeErrorZ) -> CResult_COption_OnionMessageContentsZDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(orig: &CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A tuple of 3 elements. See the individual fields for the types contained.
-pub struct C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
- /// The element at position 0
- pub a: crate::lightning::onion_message::packet::OnionMessageContents,
- /// The element at position 1
- pub b: crate::lightning::onion_message::messenger::Destination,
- /// The element at position 2
- pub c: crate::lightning::blinded_path::BlindedPath,
-}
-impl From<(crate::lightning::onion_message::packet::OnionMessageContents, crate::lightning::onion_message::messenger::Destination, crate::lightning::blinded_path::BlindedPath)> for C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
- fn from (tup: (crate::lightning::onion_message::packet::OnionMessageContents, crate::lightning::onion_message::messenger::Destination, crate::lightning::blinded_path::BlindedPath)) -> Self {
- Self {
- a: tup.0,
- b: tup.1,
- c: tup.2,
- }
- }
-}
-impl C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
- #[allow(unused)] pub(crate) fn to_rust(mut self) -> (crate::lightning::onion_message::packet::OnionMessageContents, crate::lightning::onion_message::messenger::Destination, crate::lightning::blinded_path::BlindedPath) {
- (self.a, self.b, self.c)
- }
+/// The contents of CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ
+pub union CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::lightning::offers::invoice_request::UnsignedInvoiceRequest,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::offers::parse::Bolt12SemanticError,
}
-impl Clone for C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
- fn clone(&self) -> Self {
- Self {
- a: Clone::clone(&self.a),
- b: Clone::clone(&self.b),
- c: Clone::clone(&self.c),
- }
- }
+#[repr(C)]
+/// A CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::offers::invoice_request::UnsignedInvoiceRequest on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ /// The contents of this CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr,
+ /// Whether this CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ represents a success state.
+ pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new tuple which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn C3Tuple_OnionMessageContentsDestinationBlindedPathZ_clone(orig: &C3Tuple_OnionMessageContentsDestinationBlindedPathZ) -> C3Tuple_OnionMessageContentsDestinationBlindedPathZ { Clone::clone(&orig) }
-/// Creates a new C3Tuple_OnionMessageContentsDestinationBlindedPathZ from the contained elements.
-#[no_mangle]
-pub extern "C" fn C3Tuple_OnionMessageContentsDestinationBlindedPathZ_new(a: crate::lightning::onion_message::packet::OnionMessageContents, b: crate::lightning::onion_message::messenger::Destination, c: crate::lightning::blinded_path::BlindedPath) -> C3Tuple_OnionMessageContentsDestinationBlindedPathZ {
- C3Tuple_OnionMessageContentsDestinationBlindedPathZ { a, b, c, }
+/// Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the success state.
+pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o: crate::lightning::offers::invoice_request::UnsignedInvoiceRequest) -> CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
+ }
}
-
#[no_mangle]
-/// Frees any resources used by the C3Tuple_OnionMessageContentsDestinationBlindedPathZ.
-pub extern "C" fn C3Tuple_OnionMessageContentsDestinationBlindedPathZ_free(_res: C3Tuple_OnionMessageContentsDestinationBlindedPathZ) { }
-#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZs of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
-}
-impl CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+/// Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state.
+pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e: crate::lightning::offers::parse::Bolt12SemanticError) -> CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
}
}
-impl From<Vec<crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ>> for CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
- fn from(v: Vec<crate::c_types::derived::C3Tuple_OnionMessageContentsDestinationBlindedPathZ>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
- }
+/// Checks if the given object is currently in the success state
+#[no_mangle]
+pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o: &CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ) -> bool {
+ o.result_ok
}
#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ_free(_res: CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ) { }
-impl Drop for CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
+/// Frees any resources used by the CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ.
+pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ) { }
+impl Drop for CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
+ }
}
}
-impl Clone for CVec_C3Tuple_OnionMessageContentsDestinationBlindedPathZZ {
- fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
+impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::UnsignedInvoiceRequest, crate::lightning::offers::parse::Bolt12SemanticError>> for CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::UnsignedInvoiceRequest, crate::lightning::offers::parse::Bolt12SemanticError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
}
}
-#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a crate::lightning::ln::wire::Type or not
-pub enum COption_TypeZ {
- /// When we're in this state, this COption_TypeZ contains a crate::lightning::ln::wire::Type
- Some(crate::lightning::ln::wire::Type),
- /// When we're in this state, this COption_TypeZ contains nothing
- None
-}
-impl COption_TypeZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
- }
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
- }
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::ln::wire::Type {
- if let Self::Some(v) = self { v } else { unreachable!() }
+impl Clone for CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::offers::invoice_request::UnsignedInvoiceRequest>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::offers::parse::Bolt12SemanticError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
}
}
#[no_mangle]
-/// Constructs a new COption_TypeZ containing a crate::lightning::ln::wire::Type
-pub extern "C" fn COption_TypeZ_some(o: crate::lightning::ln::wire::Type) -> COption_TypeZ {
- COption_TypeZ::Some(o)
-}
-#[no_mangle]
-/// Constructs a new COption_TypeZ containing nothing
-pub extern "C" fn COption_TypeZ_none() -> COption_TypeZ {
- COption_TypeZ::None
-}
-#[no_mangle]
-/// Frees any resources associated with the crate::lightning::ln::wire::Type, if we are in the Some state
-pub extern "C" fn COption_TypeZ_free(_res: COption_TypeZ) { }
-#[no_mangle]
-/// Creates a new COption_TypeZ which has the same data as `orig`
+/// Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_TypeZ_clone(orig: &COption_TypeZ) -> COption_TypeZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig: &CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ) -> CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_COption_TypeZDecodeErrorZ
-pub union CResult_COption_TypeZDecodeErrorZPtr {
+/// The contents of CResult_InvoiceRequestBolt12SemanticErrorZ
+pub union CResult_InvoiceRequestBolt12SemanticErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::COption_TypeZ,
+ pub result: *mut crate::lightning::offers::invoice_request::InvoiceRequest,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::DecodeError,
+ pub err: *mut crate::lightning::offers::parse::Bolt12SemanticError,
}
#[repr(C)]
-/// A CResult_COption_TypeZDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::COption_TypeZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_InvoiceRequestBolt12SemanticErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::offers::invoice_request::InvoiceRequest on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_COption_TypeZDecodeErrorZ {
- /// The contents of this CResult_COption_TypeZDecodeErrorZ, accessible via either
+pub struct CResult_InvoiceRequestBolt12SemanticErrorZ {
+ /// The contents of this CResult_InvoiceRequestBolt12SemanticErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_COption_TypeZDecodeErrorZPtr,
- /// Whether this CResult_COption_TypeZDecodeErrorZ represents a success state.
+ pub contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr,
+ /// Whether this CResult_InvoiceRequestBolt12SemanticErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_COption_TypeZDecodeErrorZ in the success state.
-pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_ok(o: crate::c_types::derived::COption_TypeZ) -> CResult_COption_TypeZDecodeErrorZ {
- CResult_COption_TypeZDecodeErrorZ {
- contents: CResult_COption_TypeZDecodeErrorZPtr {
+/// Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the success state.
+pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o: crate::lightning::offers::invoice_request::InvoiceRequest) -> CResult_InvoiceRequestBolt12SemanticErrorZ {
+ CResult_InvoiceRequestBolt12SemanticErrorZ {
+ contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_COption_TypeZDecodeErrorZ in the error state.
-pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_TypeZDecodeErrorZ {
- CResult_COption_TypeZDecodeErrorZ {
- contents: CResult_COption_TypeZDecodeErrorZPtr {
+/// Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the error state.
+pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_err(e: crate::lightning::offers::parse::Bolt12SemanticError) -> CResult_InvoiceRequestBolt12SemanticErrorZ {
+ CResult_InvoiceRequestBolt12SemanticErrorZ {
+ contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_is_ok(o: &CResult_COption_TypeZDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o: &CResult_InvoiceRequestBolt12SemanticErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_COption_TypeZDecodeErrorZ.
-pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_free(_res: CResult_COption_TypeZDecodeErrorZ) { }
-impl Drop for CResult_COption_TypeZDecodeErrorZ {
+/// Frees any resources used by the CResult_InvoiceRequestBolt12SemanticErrorZ.
+pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res: CResult_InvoiceRequestBolt12SemanticErrorZ) { }
+impl Drop for CResult_InvoiceRequestBolt12SemanticErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_TypeZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_TypeZDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_TypeZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::InvoiceRequest, crate::lightning::offers::parse::Bolt12SemanticError>> for CResult_InvoiceRequestBolt12SemanticErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::InvoiceRequest, crate::lightning::offers::parse::Bolt12SemanticError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_COption_TypeZDecodeErrorZPtr { result }
+ CResult_InvoiceRequestBolt12SemanticErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_COption_TypeZDecodeErrorZPtr { err }
+ CResult_InvoiceRequestBolt12SemanticErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_COption_TypeZDecodeErrorZ {
+impl Clone for CResult_InvoiceRequestBolt12SemanticErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_COption_TypeZDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::COption_TypeZ>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::offers::invoice_request::InvoiceRequest>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_COption_TypeZDecodeErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::offers::parse::Bolt12SemanticError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_COption_TypeZDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_COption_TypeZDecodeErrorZ_clone(orig: &CResult_COption_TypeZDecodeErrorZ) -> CResult_COption_TypeZDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig: &CResult_InvoiceRequestBolt12SemanticErrorZ) -> CResult_InvoiceRequestBolt12SemanticErrorZ { Clone::clone(&orig) }
#[repr(C)]
#[derive(Clone)]
-/// An enum which can either contain a crate::lightning::ln::msgs::SocketAddress or not
-pub enum COption_SocketAddressZ {
- /// When we're in this state, this COption_SocketAddressZ contains a crate::lightning::ln::msgs::SocketAddress
- Some(crate::lightning::ln::msgs::SocketAddress),
- /// When we're in this state, this COption_SocketAddressZ contains nothing
+/// An enum which can either contain a crate::c_types::SecretKey or not
+pub enum COption_SecretKeyZ {
+ /// When we're in this state, this COption_SecretKeyZ contains a crate::c_types::SecretKey
+ Some(crate::c_types::SecretKey),
+ /// When we're in this state, this COption_SecretKeyZ contains nothing
None
}
-impl COption_SocketAddressZ {
+impl COption_SecretKeyZ {
#[allow(unused)] pub(crate) fn is_some(&self) -> bool {
if let Self::None = self { false } else { true }
}
#[allow(unused)] pub(crate) fn is_none(&self) -> bool {
!self.is_some()
}
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::ln::msgs::SocketAddress {
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::c_types::SecretKey {
if let Self::Some(v) = self { v } else { unreachable!() }
}
}
#[no_mangle]
-/// Constructs a new COption_SocketAddressZ containing a crate::lightning::ln::msgs::SocketAddress
-pub extern "C" fn COption_SocketAddressZ_some(o: crate::lightning::ln::msgs::SocketAddress) -> COption_SocketAddressZ {
- COption_SocketAddressZ::Some(o)
+/// Constructs a new COption_SecretKeyZ containing a crate::c_types::SecretKey
+pub extern "C" fn COption_SecretKeyZ_some(o: crate::c_types::SecretKey) -> COption_SecretKeyZ {
+ COption_SecretKeyZ::Some(o)
}
#[no_mangle]
-/// Constructs a new COption_SocketAddressZ containing nothing
-pub extern "C" fn COption_SocketAddressZ_none() -> COption_SocketAddressZ {
- COption_SocketAddressZ::None
+/// Constructs a new COption_SecretKeyZ containing nothing
+pub extern "C" fn COption_SecretKeyZ_none() -> COption_SecretKeyZ {
+ COption_SecretKeyZ::None
}
#[no_mangle]
-/// Frees any resources associated with the crate::lightning::ln::msgs::SocketAddress, if we are in the Some state
-pub extern "C" fn COption_SocketAddressZ_free(_res: COption_SocketAddressZ) { }
+/// Frees any resources associated with the crate::c_types::SecretKey, if we are in the Some state
+pub extern "C" fn COption_SecretKeyZ_free(_res: COption_SecretKeyZ) { }
#[no_mangle]
-/// Creates a new COption_SocketAddressZ which has the same data as `orig`
+/// Creates a new COption_SecretKeyZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_SocketAddressZ_clone(orig: &COption_SocketAddressZ) -> COption_SocketAddressZ { Clone::clone(&orig) }
+pub extern "C" fn COption_SecretKeyZ_clone(orig: &COption_SecretKeyZ) -> COption_SecretKeyZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::ln::peer_handler::PeerDetailss of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_PeerDetailsZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::ln::peer_handler::PeerDetails,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
+/// The contents of CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ
+pub union CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::offers::parse::Bolt12SemanticError,
}
-impl CVec_PeerDetailsZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::peer_handler::PeerDetails> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::peer_handler::PeerDetails] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+#[repr(C)]
+/// A CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+ /// The contents of this CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr,
+ /// Whether this CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
+pub extern "C" fn CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o: crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder) -> CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+ contents: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
}
}
-impl From<Vec<crate::lightning::ln::peer_handler::PeerDetails>> for CVec_PeerDetailsZ {
- fn from(v: Vec<crate::lightning::ln::peer_handler::PeerDetails>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+#[no_mangle]
+/// Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
+pub extern "C" fn CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e: crate::lightning::offers::parse::Bolt12SemanticError) -> CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+ contents: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
}
}
+/// Checks if the given object is currently in the success state
#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_PeerDetailsZ_free(_res: CVec_PeerDetailsZ) { }
-impl Drop for CVec_PeerDetailsZ {
+pub extern "C" fn CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o: &CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.
+pub extern "C" fn CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ) { }
+impl Drop for CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
+ }
+ }
+}
+impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder, crate::lightning::offers::parse::Bolt12SemanticError>> for CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder, crate::lightning::offers::parse::Bolt12SemanticError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
}
}
#[repr(C)]
-/// The contents of CResult_CVec_u8ZPeerHandleErrorZ
-pub union CResult_CVec_u8ZPeerHandleErrorZPtr {
+/// The contents of CResult_VerifiedInvoiceRequestNoneZ
+pub union CResult_VerifiedInvoiceRequestNoneZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::CVec_u8Z,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::peer_handler::PeerHandleError,
+ pub result: *mut crate::lightning::offers::invoice_request::VerifiedInvoiceRequest,
+ /// Note that this value is always NULL, as there are no contents in the Err variant
+ pub err: *mut core::ffi::c_void,
}
#[repr(C)]
-/// A CResult_CVec_u8ZPeerHandleErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::CVec_u8Z on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure.
+/// A CResult_VerifiedInvoiceRequestNoneZ represents the result of a fallible operation,
+/// containing a crate::lightning::offers::invoice_request::VerifiedInvoiceRequest on success and a () on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_CVec_u8ZPeerHandleErrorZ {
- /// The contents of this CResult_CVec_u8ZPeerHandleErrorZ, accessible via either
+pub struct CResult_VerifiedInvoiceRequestNoneZ {
+ /// The contents of this CResult_VerifiedInvoiceRequestNoneZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_CVec_u8ZPeerHandleErrorZPtr,
- /// Whether this CResult_CVec_u8ZPeerHandleErrorZ represents a success state.
+ pub contents: CResult_VerifiedInvoiceRequestNoneZPtr,
+ /// Whether this CResult_VerifiedInvoiceRequestNoneZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state.
-pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_ok(o: crate::c_types::derived::CVec_u8Z) -> CResult_CVec_u8ZPeerHandleErrorZ {
- CResult_CVec_u8ZPeerHandleErrorZ {
- contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
+/// Creates a new CResult_VerifiedInvoiceRequestNoneZ in the success state.
+pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_ok(o: crate::lightning::offers::invoice_request::VerifiedInvoiceRequest) -> CResult_VerifiedInvoiceRequestNoneZ {
+ CResult_VerifiedInvoiceRequestNoneZ {
+ contents: CResult_VerifiedInvoiceRequestNoneZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state.
-pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_err(e: crate::lightning::ln::peer_handler::PeerHandleError) -> CResult_CVec_u8ZPeerHandleErrorZ {
- CResult_CVec_u8ZPeerHandleErrorZ {
- contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
- err: Box::into_raw(Box::new(e)),
+/// Creates a new CResult_VerifiedInvoiceRequestNoneZ in the error state.
+pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_err() -> CResult_VerifiedInvoiceRequestNoneZ {
+ CResult_VerifiedInvoiceRequestNoneZ {
+ contents: CResult_VerifiedInvoiceRequestNoneZPtr {
+ err: core::ptr::null_mut(),
},
result_ok: false,
}
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_is_ok(o: &CResult_CVec_u8ZPeerHandleErrorZ) -> bool {
+pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_is_ok(o: &CResult_VerifiedInvoiceRequestNoneZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_CVec_u8ZPeerHandleErrorZ.
-pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_free(_res: CResult_CVec_u8ZPeerHandleErrorZ) { }
-impl Drop for CResult_CVec_u8ZPeerHandleErrorZ {
+/// Frees any resources used by the CResult_VerifiedInvoiceRequestNoneZ.
+pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_free(_res: CResult_VerifiedInvoiceRequestNoneZ) { }
+impl Drop for CResult_VerifiedInvoiceRequestNoneZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
let _ = unsafe { Box::from_raw(self.contents.result) };
}
} else {
- if unsafe { !(self.contents.err as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.err) };
- }
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_u8Z, crate::lightning::ln::peer_handler::PeerHandleError>> for CResult_CVec_u8ZPeerHandleErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_u8Z, crate::lightning::ln::peer_handler::PeerHandleError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::VerifiedInvoiceRequest, ()>> for CResult_VerifiedInvoiceRequestNoneZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::VerifiedInvoiceRequest, ()>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_CVec_u8ZPeerHandleErrorZPtr { result }
+ CResult_VerifiedInvoiceRequestNoneZPtr { result }
} else {
- let err = unsafe { o.contents.err };
- unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_CVec_u8ZPeerHandleErrorZPtr { err }
+ let _ = unsafe { Box::from_raw(o.contents.err) };
+ o.contents.err = core::ptr::null_mut();
+ CResult_VerifiedInvoiceRequestNoneZPtr { err: core::ptr::null_mut() }
};
Self {
contents,
}
}
}
-impl Clone for CResult_CVec_u8ZPeerHandleErrorZ {
+impl Clone for CResult_VerifiedInvoiceRequestNoneZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_u8Z>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_VerifiedInvoiceRequestNoneZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::offers::invoice_request::VerifiedInvoiceRequest>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_CVec_u8ZPeerHandleErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::peer_handler::PeerHandleError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_VerifiedInvoiceRequestNoneZPtr {
+ err: core::ptr::null_mut()
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_CVec_u8ZPeerHandleErrorZ which has the same data as `orig`
+/// Creates a new CResult_VerifiedInvoiceRequestNoneZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: &CResult_CVec_u8ZPeerHandleErrorZ) -> CResult_CVec_u8ZPeerHandleErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_clone(orig: &CResult_VerifiedInvoiceRequestNoneZ) -> CResult_VerifiedInvoiceRequestNoneZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_NonePeerHandleErrorZ
-pub union CResult_NonePeerHandleErrorZPtr {
- /// Note that this value is always NULL, as there are no contents in the OK variant
- pub result: *mut core::ffi::c_void,
+/// The contents of CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ
+pub union CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::peer_handler::PeerHandleError,
+ pub err: *mut crate::lightning::offers::parse::Bolt12SemanticError,
}
#[repr(C)]
-/// A CResult_NonePeerHandleErrorZ represents the result of a fallible operation,
-/// containing a () on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure.
+/// A CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_NonePeerHandleErrorZ {
- /// The contents of this CResult_NonePeerHandleErrorZ, accessible via either
+pub struct CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+ /// The contents of this CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_NonePeerHandleErrorZPtr,
- /// Whether this CResult_NonePeerHandleErrorZ represents a success state.
+ pub contents: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr,
+ /// Whether this CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_NonePeerHandleErrorZ in the success state.
-pub extern "C" fn CResult_NonePeerHandleErrorZ_ok() -> CResult_NonePeerHandleErrorZ {
- CResult_NonePeerHandleErrorZ {
- contents: CResult_NonePeerHandleErrorZPtr {
- result: core::ptr::null_mut(),
+/// Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
+pub extern "C" fn CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o: crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder) -> CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+ contents: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_NonePeerHandleErrorZ in the error state.
-pub extern "C" fn CResult_NonePeerHandleErrorZ_err(e: crate::lightning::ln::peer_handler::PeerHandleError) -> CResult_NonePeerHandleErrorZ {
- CResult_NonePeerHandleErrorZ {
- contents: CResult_NonePeerHandleErrorZPtr {
+/// Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
+pub extern "C" fn CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e: crate::lightning::offers::parse::Bolt12SemanticError) -> CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+ contents: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_NonePeerHandleErrorZ_is_ok(o: &CResult_NonePeerHandleErrorZ) -> bool {
+pub extern "C" fn CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o: &CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_NonePeerHandleErrorZ.
-pub extern "C" fn CResult_NonePeerHandleErrorZ_free(_res: CResult_NonePeerHandleErrorZ) { }
-impl Drop for CResult_NonePeerHandleErrorZ {
+/// Frees any resources used by the CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.
+pub extern "C" fn CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ) { }
+impl Drop for CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
fn drop(&mut self) {
if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
} else {
if unsafe { !(self.contents.err as *mut ()).is_null() } {
let _ = unsafe { Box::from_raw(self.contents.err) };
}
}
}
-impl From<crate::c_types::CResultTempl<(), crate::lightning::ln::peer_handler::PeerHandleError>> for CResult_NonePeerHandleErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<(), crate::lightning::ln::peer_handler::PeerHandleError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder, crate::lightning::offers::parse::Bolt12SemanticError>> for CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder, crate::lightning::offers::parse::Bolt12SemanticError>) -> Self {
let contents = if o.result_ok {
- let _ = unsafe { Box::from_raw(o.contents.result) };
- o.contents.result = core::ptr::null_mut();
- CResult_NonePeerHandleErrorZPtr { result: core::ptr::null_mut() }
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_NonePeerHandleErrorZPtr { err }
+ CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_NonePeerHandleErrorZ {
- fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_NonePeerHandleErrorZPtr {
- result: core::ptr::null_mut()
- } }
- } else {
- Self { result_ok: false, contents: CResult_NonePeerHandleErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::peer_handler::PeerHandleError>::clone(unsafe { &*self.contents.err })))
- } }
- }
- }
-}
-#[no_mangle]
-/// Creates a new CResult_NonePeerHandleErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_NonePeerHandleErrorZ_clone(orig: &CResult_NonePeerHandleErrorZ) -> CResult_NonePeerHandleErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_boolPeerHandleErrorZ
-pub union CResult_boolPeerHandleErrorZPtr {
+/// The contents of CResult_InvoiceRequestFieldsDecodeErrorZ
+pub union CResult_InvoiceRequestFieldsDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut bool,
+ pub result: *mut crate::lightning::offers::invoice_request::InvoiceRequestFields,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::peer_handler::PeerHandleError,
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_boolPeerHandleErrorZ represents the result of a fallible operation,
-/// containing a bool on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure.
+/// A CResult_InvoiceRequestFieldsDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::offers::invoice_request::InvoiceRequestFields on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_boolPeerHandleErrorZ {
- /// The contents of this CResult_boolPeerHandleErrorZ, accessible via either
+pub struct CResult_InvoiceRequestFieldsDecodeErrorZ {
+ /// The contents of this CResult_InvoiceRequestFieldsDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_boolPeerHandleErrorZPtr,
- /// Whether this CResult_boolPeerHandleErrorZ represents a success state.
+ pub contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr,
+ /// Whether this CResult_InvoiceRequestFieldsDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_boolPeerHandleErrorZ in the success state.
-pub extern "C" fn CResult_boolPeerHandleErrorZ_ok(o: bool) -> CResult_boolPeerHandleErrorZ {
- CResult_boolPeerHandleErrorZ {
- contents: CResult_boolPeerHandleErrorZPtr {
+/// Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the success state.
+pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o: crate::lightning::offers::invoice_request::InvoiceRequestFields) -> CResult_InvoiceRequestFieldsDecodeErrorZ {
+ CResult_InvoiceRequestFieldsDecodeErrorZ {
+ contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_boolPeerHandleErrorZ in the error state.
-pub extern "C" fn CResult_boolPeerHandleErrorZ_err(e: crate::lightning::ln::peer_handler::PeerHandleError) -> CResult_boolPeerHandleErrorZ {
- CResult_boolPeerHandleErrorZ {
- contents: CResult_boolPeerHandleErrorZPtr {
+/// Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the error state.
+pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_InvoiceRequestFieldsDecodeErrorZ {
+ CResult_InvoiceRequestFieldsDecodeErrorZ {
+ contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_boolPeerHandleErrorZ_is_ok(o: &CResult_boolPeerHandleErrorZ) -> bool {
+pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o: &CResult_InvoiceRequestFieldsDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_boolPeerHandleErrorZ.
-pub extern "C" fn CResult_boolPeerHandleErrorZ_free(_res: CResult_boolPeerHandleErrorZ) { }
-impl Drop for CResult_boolPeerHandleErrorZ {
+/// Frees any resources used by the CResult_InvoiceRequestFieldsDecodeErrorZ.
+pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res: CResult_InvoiceRequestFieldsDecodeErrorZ) { }
+impl Drop for CResult_InvoiceRequestFieldsDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<bool, crate::lightning::ln::peer_handler::PeerHandleError>> for CResult_boolPeerHandleErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<bool, crate::lightning::ln::peer_handler::PeerHandleError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::InvoiceRequestFields, crate::lightning::ln::msgs::DecodeError>> for CResult_InvoiceRequestFieldsDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::InvoiceRequestFields, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_boolPeerHandleErrorZPtr { result }
+ CResult_InvoiceRequestFieldsDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_boolPeerHandleErrorZPtr { err }
+ CResult_InvoiceRequestFieldsDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_boolPeerHandleErrorZ {
+impl Clone for CResult_InvoiceRequestFieldsDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_boolPeerHandleErrorZPtr {
- result: Box::into_raw(Box::new(<bool>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::offers::invoice_request::InvoiceRequestFields>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_boolPeerHandleErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::peer_handler::PeerHandleError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_boolPeerHandleErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_boolPeerHandleErrorZ_clone(orig: &CResult_boolPeerHandleErrorZ) -> CResult_boolPeerHandleErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// The contents of CResult_u32GraphSyncErrorZ
-pub union CResult_u32GraphSyncErrorZPtr {
- /// A pointer to the contents in the success state.
- /// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut u32,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning_rapid_gossip_sync::GraphSyncError,
-}
-#[repr(C)]
-/// A CResult_u32GraphSyncErrorZ represents the result of a fallible operation,
-/// containing a u32 on success and a crate::lightning_rapid_gossip_sync::GraphSyncError on failure.
-/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_u32GraphSyncErrorZ {
- /// The contents of this CResult_u32GraphSyncErrorZ, accessible via either
- /// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_u32GraphSyncErrorZPtr,
- /// Whether this CResult_u32GraphSyncErrorZ represents a success state.
- pub result_ok: bool,
+/// Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig: &CResult_InvoiceRequestFieldsDecodeErrorZ) -> CResult_InvoiceRequestFieldsDecodeErrorZ { Clone::clone(&orig) }
+#[repr(C)]
+/// An enum which can either contain a or not
+pub enum COption_NoneZ {
+ /// When we're in this state, this COption_NoneZ contains a
+ Some,
+ /// When we're in this state, this COption_NoneZ contains nothing
+ None
+}
+impl COption_NoneZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+}
+#[no_mangle]
+/// Constructs a new COption_NoneZ containing a
+pub extern "C" fn COption_NoneZ_some() -> COption_NoneZ {
+ COption_NoneZ::Some
+}
+#[no_mangle]
+/// Constructs a new COption_NoneZ containing nothing
+pub extern "C" fn COption_NoneZ_none() -> COption_NoneZ {
+ COption_NoneZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the , if we are in the Some state
+pub extern "C" fn COption_NoneZ_free(_res: COption_NoneZ) { }
+#[repr(C)]
+/// A dynamically-allocated array of crate::c_types::Witnesss of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_WitnessZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::c_types::Witness,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
+}
+impl CVec_WitnessZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::Witness> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
+ }
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::Witness] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ }
+}
+impl From<Vec<crate::c_types::Witness>> for CVec_WitnessZ {
+ fn from(v: Vec<crate::c_types::Witness>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
+}
+#[no_mangle]
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_WitnessZ_free(_res: CVec_WitnessZ) { }
+impl Drop for CVec_WitnessZ {
+ fn drop(&mut self) {
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ }
+}
+impl Clone for CVec_WitnessZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
+#[repr(C)]
+#[derive(Clone)]
+/// An enum which can either contain a crate::c_types::ECDSASignature or not
+pub enum COption_ECDSASignatureZ {
+ /// When we're in this state, this COption_ECDSASignatureZ contains a crate::c_types::ECDSASignature
+ Some(crate::c_types::ECDSASignature),
+ /// When we're in this state, this COption_ECDSASignatureZ contains nothing
+ None
+}
+impl COption_ECDSASignatureZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::c_types::ECDSASignature {
+ if let Self::Some(v) = self { v } else { unreachable!() }
+ }
+}
+#[no_mangle]
+/// Constructs a new COption_ECDSASignatureZ containing a crate::c_types::ECDSASignature
+pub extern "C" fn COption_ECDSASignatureZ_some(o: crate::c_types::ECDSASignature) -> COption_ECDSASignatureZ {
+ COption_ECDSASignatureZ::Some(o)
}
#[no_mangle]
-/// Creates a new CResult_u32GraphSyncErrorZ in the success state.
-pub extern "C" fn CResult_u32GraphSyncErrorZ_ok(o: u32) -> CResult_u32GraphSyncErrorZ {
- CResult_u32GraphSyncErrorZ {
- contents: CResult_u32GraphSyncErrorZPtr {
- result: Box::into_raw(Box::new(o)),
- },
- result_ok: true,
- }
+/// Constructs a new COption_ECDSASignatureZ containing nothing
+pub extern "C" fn COption_ECDSASignatureZ_none() -> COption_ECDSASignatureZ {
+ COption_ECDSASignatureZ::None
}
#[no_mangle]
-/// Creates a new CResult_u32GraphSyncErrorZ in the error state.
-pub extern "C" fn CResult_u32GraphSyncErrorZ_err(e: crate::lightning_rapid_gossip_sync::GraphSyncError) -> CResult_u32GraphSyncErrorZ {
- CResult_u32GraphSyncErrorZ {
- contents: CResult_u32GraphSyncErrorZPtr {
- err: Box::into_raw(Box::new(e)),
- },
- result_ok: false,
+/// Frees any resources associated with the crate::c_types::ECDSASignature, if we are in the Some state
+pub extern "C" fn COption_ECDSASignatureZ_free(_res: COption_ECDSASignatureZ) { }
+#[no_mangle]
+/// Creates a new COption_ECDSASignatureZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_ECDSASignatureZ_clone(orig: &COption_ECDSASignatureZ) -> COption_ECDSASignatureZ { Clone::clone(&orig) }
+#[repr(C)]
+#[derive(Clone)]
+/// An enum which can either contain a i64 or not
+pub enum COption_i64Z {
+ /// When we're in this state, this COption_i64Z contains a i64
+ Some(i64),
+ /// When we're in this state, this COption_i64Z contains nothing
+ None
+}
+impl COption_i64Z {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> i64 {
+ if let Self::Some(v) = self { v } else { unreachable!() }
}
}
-/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_u32GraphSyncErrorZ_is_ok(o: &CResult_u32GraphSyncErrorZ) -> bool {
- o.result_ok
+/// Constructs a new COption_i64Z containing a i64
+pub extern "C" fn COption_i64Z_some(o: i64) -> COption_i64Z {
+ COption_i64Z::Some(o)
}
#[no_mangle]
-/// Frees any resources used by the CResult_u32GraphSyncErrorZ.
-pub extern "C" fn CResult_u32GraphSyncErrorZ_free(_res: CResult_u32GraphSyncErrorZ) { }
-impl Drop for CResult_u32GraphSyncErrorZ {
- fn drop(&mut self) {
- if self.result_ok {
- if unsafe { !(self.contents.result as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.result) };
- }
- } else {
- if unsafe { !(self.contents.err as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.err) };
- }
- }
- }
-}
-impl From<crate::c_types::CResultTempl<u32, crate::lightning_rapid_gossip_sync::GraphSyncError>> for CResult_u32GraphSyncErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<u32, crate::lightning_rapid_gossip_sync::GraphSyncError>) -> Self {
- let contents = if o.result_ok {
- let result = unsafe { o.contents.result };
- unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_u32GraphSyncErrorZPtr { result }
- } else {
- let err = unsafe { o.contents.err };
- unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_u32GraphSyncErrorZPtr { err }
- };
- Self {
- contents,
- result_ok: o.result_ok,
- }
- }
+/// Constructs a new COption_i64Z containing nothing
+pub extern "C" fn COption_i64Z_none() -> COption_i64Z {
+ COption_i64Z::None
}
+#[no_mangle]
+/// Frees any resources associated with the i64, if we are in the Some state
+pub extern "C" fn COption_i64Z_free(_res: COption_i64Z) { }
+#[no_mangle]
+/// Creates a new COption_i64Z which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_i64Z_clone(orig: &COption_i64Z) -> COption_i64Z { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_CVec_u8ZIOErrorZ
-pub union CResult_CVec_u8ZIOErrorZPtr {
+/// The contents of CResult_SocketAddressDecodeErrorZ
+pub union CResult_SocketAddressDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::CVec_u8Z,
+ pub result: *mut crate::lightning::ln::msgs::SocketAddress,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::c_types::IOError,
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_CVec_u8ZIOErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::CVec_u8Z on success and a crate::c_types::IOError on failure.
+/// A CResult_SocketAddressDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::SocketAddress on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_CVec_u8ZIOErrorZ {
- /// The contents of this CResult_CVec_u8ZIOErrorZ, accessible via either
+pub struct CResult_SocketAddressDecodeErrorZ {
+ /// The contents of this CResult_SocketAddressDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_CVec_u8ZIOErrorZPtr,
- /// Whether this CResult_CVec_u8ZIOErrorZ represents a success state.
+ pub contents: CResult_SocketAddressDecodeErrorZPtr,
+ /// Whether this CResult_SocketAddressDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_CVec_u8ZIOErrorZ in the success state.
-pub extern "C" fn CResult_CVec_u8ZIOErrorZ_ok(o: crate::c_types::derived::CVec_u8Z) -> CResult_CVec_u8ZIOErrorZ {
- CResult_CVec_u8ZIOErrorZ {
- contents: CResult_CVec_u8ZIOErrorZPtr {
+/// Creates a new CResult_SocketAddressDecodeErrorZ in the success state.
+pub extern "C" fn CResult_SocketAddressDecodeErrorZ_ok(o: crate::lightning::ln::msgs::SocketAddress) -> CResult_SocketAddressDecodeErrorZ {
+ CResult_SocketAddressDecodeErrorZ {
+ contents: CResult_SocketAddressDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_CVec_u8ZIOErrorZ in the error state.
-pub extern "C" fn CResult_CVec_u8ZIOErrorZ_err(e: crate::c_types::IOError) -> CResult_CVec_u8ZIOErrorZ {
- CResult_CVec_u8ZIOErrorZ {
- contents: CResult_CVec_u8ZIOErrorZPtr {
+/// Creates a new CResult_SocketAddressDecodeErrorZ in the error state.
+pub extern "C" fn CResult_SocketAddressDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_SocketAddressDecodeErrorZ {
+ CResult_SocketAddressDecodeErrorZ {
+ contents: CResult_SocketAddressDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_CVec_u8ZIOErrorZ_is_ok(o: &CResult_CVec_u8ZIOErrorZ) -> bool {
+pub extern "C" fn CResult_SocketAddressDecodeErrorZ_is_ok(o: &CResult_SocketAddressDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_CVec_u8ZIOErrorZ.
-pub extern "C" fn CResult_CVec_u8ZIOErrorZ_free(_res: CResult_CVec_u8ZIOErrorZ) { }
-impl Drop for CResult_CVec_u8ZIOErrorZ {
+/// Frees any resources used by the CResult_SocketAddressDecodeErrorZ.
+pub extern "C" fn CResult_SocketAddressDecodeErrorZ_free(_res: CResult_SocketAddressDecodeErrorZ) { }
+impl Drop for CResult_SocketAddressDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_u8Z, crate::c_types::IOError>> for CResult_CVec_u8ZIOErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_u8Z, crate::c_types::IOError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::SocketAddress, crate::lightning::ln::msgs::DecodeError>> for CResult_SocketAddressDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::SocketAddress, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_CVec_u8ZIOErrorZPtr { result }
+ CResult_SocketAddressDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_CVec_u8ZIOErrorZPtr { err }
+ CResult_SocketAddressDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_CVec_u8ZIOErrorZ {
+impl Clone for CResult_SocketAddressDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_CVec_u8ZIOErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_u8Z>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_SocketAddressDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SocketAddress>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_CVec_u8ZIOErrorZPtr {
- err: Box::into_raw(Box::new(<crate::c_types::IOError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_SocketAddressDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_CVec_u8ZIOErrorZ which has the same data as `orig`
+/// Creates a new CResult_SocketAddressDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_CVec_u8ZIOErrorZ_clone(orig: &CResult_CVec_u8ZIOErrorZ) -> CResult_CVec_u8ZIOErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::Strs of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_StrZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::Str,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
-}
-impl CVec_StrZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::Str> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::Str] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
- }
-}
-impl From<Vec<crate::c_types::Str>> for CVec_StrZ {
- fn from(v: Vec<crate::c_types::Str>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
- }
-}
-#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_StrZ_free(_res: CVec_StrZ) { }
-impl Drop for CVec_StrZ {
- fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
- }
-}
-impl Clone for CVec_StrZ {
- fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
- }
-}
+pub extern "C" fn CResult_SocketAddressDecodeErrorZ_clone(orig: &CResult_SocketAddressDecodeErrorZ) -> CResult_SocketAddressDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_CVec_StrZIOErrorZ
-pub union CResult_CVec_StrZIOErrorZPtr {
+/// The contents of CResult_SocketAddressSocketAddressParseErrorZ
+pub union CResult_SocketAddressSocketAddressParseErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::CVec_StrZ,
+ pub result: *mut crate::lightning::ln::msgs::SocketAddress,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::c_types::IOError,
+ pub err: *mut crate::lightning::ln::msgs::SocketAddressParseError,
}
#[repr(C)]
-/// A CResult_CVec_StrZIOErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::CVec_StrZ on success and a crate::c_types::IOError on failure.
+/// A CResult_SocketAddressSocketAddressParseErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::SocketAddress on success and a crate::lightning::ln::msgs::SocketAddressParseError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_CVec_StrZIOErrorZ {
- /// The contents of this CResult_CVec_StrZIOErrorZ, accessible via either
+pub struct CResult_SocketAddressSocketAddressParseErrorZ {
+ /// The contents of this CResult_SocketAddressSocketAddressParseErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_CVec_StrZIOErrorZPtr,
- /// Whether this CResult_CVec_StrZIOErrorZ represents a success state.
+ pub contents: CResult_SocketAddressSocketAddressParseErrorZPtr,
+ /// Whether this CResult_SocketAddressSocketAddressParseErrorZ represents a success state.
pub result_ok: bool,
-}
-#[no_mangle]
-/// Creates a new CResult_CVec_StrZIOErrorZ in the success state.
-pub extern "C" fn CResult_CVec_StrZIOErrorZ_ok(o: crate::c_types::derived::CVec_StrZ) -> CResult_CVec_StrZIOErrorZ {
- CResult_CVec_StrZIOErrorZ {
- contents: CResult_CVec_StrZIOErrorZPtr {
+}
+#[no_mangle]
+/// Creates a new CResult_SocketAddressSocketAddressParseErrorZ in the success state.
+pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_ok(o: crate::lightning::ln::msgs::SocketAddress) -> CResult_SocketAddressSocketAddressParseErrorZ {
+ CResult_SocketAddressSocketAddressParseErrorZ {
+ contents: CResult_SocketAddressSocketAddressParseErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_CVec_StrZIOErrorZ in the error state.
-pub extern "C" fn CResult_CVec_StrZIOErrorZ_err(e: crate::c_types::IOError) -> CResult_CVec_StrZIOErrorZ {
- CResult_CVec_StrZIOErrorZ {
- contents: CResult_CVec_StrZIOErrorZPtr {
+/// Creates a new CResult_SocketAddressSocketAddressParseErrorZ in the error state.
+pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_err(e: crate::lightning::ln::msgs::SocketAddressParseError) -> CResult_SocketAddressSocketAddressParseErrorZ {
+ CResult_SocketAddressSocketAddressParseErrorZ {
+ contents: CResult_SocketAddressSocketAddressParseErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_CVec_StrZIOErrorZ_is_ok(o: &CResult_CVec_StrZIOErrorZ) -> bool {
+pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_is_ok(o: &CResult_SocketAddressSocketAddressParseErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_CVec_StrZIOErrorZ.
-pub extern "C" fn CResult_CVec_StrZIOErrorZ_free(_res: CResult_CVec_StrZIOErrorZ) { }
-impl Drop for CResult_CVec_StrZIOErrorZ {
+/// Frees any resources used by the CResult_SocketAddressSocketAddressParseErrorZ.
+pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_free(_res: CResult_SocketAddressSocketAddressParseErrorZ) { }
+impl Drop for CResult_SocketAddressSocketAddressParseErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_StrZ, crate::c_types::IOError>> for CResult_CVec_StrZIOErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_StrZ, crate::c_types::IOError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::SocketAddress, crate::lightning::ln::msgs::SocketAddressParseError>> for CResult_SocketAddressSocketAddressParseErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::SocketAddress, crate::lightning::ln::msgs::SocketAddressParseError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_CVec_StrZIOErrorZPtr { result }
+ CResult_SocketAddressSocketAddressParseErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_CVec_StrZIOErrorZPtr { err }
+ CResult_SocketAddressSocketAddressParseErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_CVec_StrZIOErrorZ {
+impl Clone for CResult_SocketAddressSocketAddressParseErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_CVec_StrZIOErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_StrZ>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_SocketAddressSocketAddressParseErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SocketAddress>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_CVec_StrZIOErrorZPtr {
- err: Box::into_raw(Box::new(<crate::c_types::IOError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_SocketAddressSocketAddressParseErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SocketAddressParseError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_CVec_StrZIOErrorZ which has the same data as `orig`
+/// Creates a new CResult_SocketAddressSocketAddressParseErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_CVec_StrZIOErrorZ_clone(orig: &CResult_CVec_StrZIOErrorZ) -> CResult_CVec_StrZIOErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_clone(orig: &CResult_SocketAddressSocketAddressParseErrorZ) -> CResult_SocketAddressSocketAddressParseErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZs of arbitrary size.
+/// A dynamically-allocated array of crate::lightning::ln::msgs::UpdateAddHTLCs of arbitrary size.
/// This corresponds to std::vector in C++
-pub struct CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
+pub struct CVec_UpdateAddHTLCZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ,
+ pub data: *mut crate::lightning::ln::msgs::UpdateAddHTLC,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
-impl CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ> {
+impl CVec_UpdateAddHTLCZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::msgs::UpdateAddHTLC> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::msgs::UpdateAddHTLC] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ>> for CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
- fn from(v: Vec<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ>) -> Self {
+impl From<Vec<crate::lightning::ln::msgs::UpdateAddHTLC>> for CVec_UpdateAddHTLCZ {
+ fn from(v: Vec<crate::lightning::ln::msgs::UpdateAddHTLC>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
#[no_mangle]
/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ_free(_res: CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ) { }
-impl Drop for CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
+pub extern "C" fn CVec_UpdateAddHTLCZ_free(_res: CVec_UpdateAddHTLCZ) { }
+impl Drop for CVec_UpdateAddHTLCZ {
fn drop(&mut self) {
if self.datalen == 0 { return; }
let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ {
+impl Clone for CVec_UpdateAddHTLCZ {
fn clone(&self) -> Self {
let mut res = Vec::new();
if self.datalen == 0 { return Self::from(res); }
}
}
#[repr(C)]
-/// The contents of CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ
-pub union CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
- /// A pointer to the contents in the success state.
- /// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::c_types::IOError,
-}
-#[repr(C)]
-/// A CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ on success and a crate::c_types::IOError on failure.
-/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
- /// The contents of this CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ, accessible via either
- /// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr,
- /// Whether this CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ represents a success state.
- pub result_ok: bool,
+/// A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFulfillHTLCs of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_UpdateFulfillHTLCZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::lightning::ln::msgs::UpdateFulfillHTLC,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
}
-#[no_mangle]
-/// Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the success state.
-pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_ok(o: crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ) -> CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
- CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
- contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
- result: Box::into_raw(Box::new(o)),
- },
- result_ok: true,
+impl CVec_UpdateFulfillHTLCZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::msgs::UpdateFulfillHTLC> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
}
-}
-#[no_mangle]
-/// Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ in the error state.
-pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_err(e: crate::c_types::IOError) -> CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
- CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
- contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
- err: Box::into_raw(Box::new(e)),
- },
- result_ok: false,
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::msgs::UpdateFulfillHTLC] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-/// Checks if the given object is currently in the success state
-#[no_mangle]
-pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_is_ok(o: &CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ) -> bool {
- o.result_ok
+impl From<Vec<crate::lightning::ln::msgs::UpdateFulfillHTLC>> for CVec_UpdateFulfillHTLCZ {
+ fn from(v: Vec<crate::lightning::ln::msgs::UpdateFulfillHTLC>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
}
#[no_mangle]
-/// Frees any resources used by the CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ.
-pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_free(_res: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ) { }
-impl Drop for CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_UpdateFulfillHTLCZ_free(_res: CVec_UpdateFulfillHTLCZ) { }
+impl Drop for CVec_UpdateFulfillHTLCZ {
fn drop(&mut self) {
- if self.result_ok {
- if unsafe { !(self.contents.result as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.result) };
- }
- } else {
- if unsafe { !(self.contents.err as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.err) };
- }
- }
- }
-}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ, crate::c_types::IOError>> for CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ, crate::c_types::IOError>) -> Self {
- let contents = if o.result_ok {
- let result = unsafe { o.contents.result };
- unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr { result }
- } else {
- let err = unsafe { o.contents.err };
- unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr { err }
- };
- Self {
- contents,
- result_ok: o.result_ok,
- }
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ {
+impl Clone for CVec_UpdateFulfillHTLCZ {
fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZ>::clone(unsafe { &*self.contents.result })))
- } }
- } else {
- Self { result_ok: false, contents: CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZPtr {
- err: Box::into_raw(Box::new(<crate::c_types::IOError>::clone(unsafe { &*self.contents.err })))
- } }
- }
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
}
}
-#[no_mangle]
-/// Creates a new CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ_clone(orig: &CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ) -> CResult_CVec_C2Tuple_ThirtyTwoBytesChannelMonitorZZIOErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// The contents of CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ
-pub union CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
- /// A pointer to the contents in the success state.
- /// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::c_types::IOError,
-}
#[repr(C)]
-/// A CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ represents the result of a fallible operation,
-/// containing a crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ on success and a crate::c_types::IOError on failure.
-/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
- /// The contents of this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ, accessible via either
- /// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr,
- /// Whether this CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ represents a success state.
- pub result_ok: bool,
+/// A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailHTLCs of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_UpdateFailHTLCZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::lightning::ln::msgs::UpdateFailHTLC,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
}
-#[no_mangle]
-/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the success state.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_ok(o: crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
- CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
- contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
- result: Box::into_raw(Box::new(o)),
- },
- result_ok: true,
+impl CVec_UpdateFailHTLCZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::msgs::UpdateFailHTLC> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
}
-}
-#[no_mangle]
-/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ in the error state.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_err(e: crate::c_types::IOError) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
- CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
- contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
- err: Box::into_raw(Box::new(e)),
- },
- result_ok: false,
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::msgs::UpdateFailHTLC] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-/// Checks if the given object is currently in the success state
-#[no_mangle]
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_is_ok(o: &CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ) -> bool {
- o.result_ok
-}
-#[no_mangle]
-/// Frees any resources used by the CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_free(_res: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ) { }
-impl Drop for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
- fn drop(&mut self) {
- if self.result_ok {
- if unsafe { !(self.contents.result as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.result) };
- }
- } else {
- if unsafe { !(self.contents.err as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.err) };
- }
- }
+impl From<Vec<crate::lightning::ln::msgs::UpdateFailHTLC>> for CVec_UpdateFailHTLCZ {
+ fn from(v: Vec<crate::lightning::ln::msgs::UpdateFailHTLC>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
}
-impl From<crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ, crate::c_types::IOError>> for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ, crate::c_types::IOError>) -> Self {
- let contents = if o.result_ok {
- let result = unsafe { o.contents.result };
- unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr { result }
- } else {
- let err = unsafe { o.contents.err };
- unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr { err }
- };
- Self {
- contents,
- result_ok: o.result_ok,
- }
+#[no_mangle]
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_UpdateFailHTLCZ_free(_res: CVec_UpdateFailHTLCZ) { }
+impl Drop for CVec_UpdateFailHTLCZ {
+ fn drop(&mut self) {
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ {
+impl Clone for CVec_UpdateFailHTLCZ {
fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
- result: Box::into_raw(Box::new(<crate::c_types::derived::C2Tuple_ThirtyTwoBytesChannelMonitorZ>::clone(unsafe { &*self.contents.result })))
- } }
- } else {
- Self { result_ok: false, contents: CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZPtr {
- err: Box::into_raw(Box::new(<crate::c_types::IOError>::clone(unsafe { &*self.contents.err })))
- } }
- }
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
}
}
-#[no_mangle]
-/// Creates a new CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ_clone(orig: &CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ) -> CResult_C2Tuple_ThirtyTwoBytesChannelMonitorZIOErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// The contents of CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ
-pub union CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
- /// A pointer to the contents in the success state.
- /// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::offers::invoice_request::UnsignedInvoiceRequest,
- /// A pointer to the contents in the error state.
- /// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::offers::parse::Bolt12SemanticError,
-}
#[repr(C)]
-/// A CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::offers::invoice_request::UnsignedInvoiceRequest on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
-/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
- /// The contents of this CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ, accessible via either
- /// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr,
- /// Whether this CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ represents a success state.
- pub result_ok: bool,
+/// A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailMalformedHTLCs of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_UpdateFailMalformedHTLCZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::lightning::ln::msgs::UpdateFailMalformedHTLC,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
}
-#[no_mangle]
-/// Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the success state.
-pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_ok(o: crate::lightning::offers::invoice_request::UnsignedInvoiceRequest) -> CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
- CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
- contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
- result: Box::into_raw(Box::new(o)),
- },
- result_ok: true,
+impl CVec_UpdateFailMalformedHTLCZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::msgs::UpdateFailMalformedHTLC> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
}
-}
-#[no_mangle]
-/// Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ in the error state.
-pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_err(e: crate::lightning::offers::parse::Bolt12SemanticError) -> CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
- CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
- contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
- err: Box::into_raw(Box::new(e)),
- },
- result_ok: false,
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::msgs::UpdateFailMalformedHTLC] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-/// Checks if the given object is currently in the success state
-#[no_mangle]
-pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_is_ok(o: &CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ) -> bool {
- o.result_ok
+impl From<Vec<crate::lightning::ln::msgs::UpdateFailMalformedHTLC>> for CVec_UpdateFailMalformedHTLCZ {
+ fn from(v: Vec<crate::lightning::ln::msgs::UpdateFailMalformedHTLC>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
}
#[no_mangle]
-/// Frees any resources used by the CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ.
-pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_free(_res: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ) { }
-impl Drop for CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_UpdateFailMalformedHTLCZ_free(_res: CVec_UpdateFailMalformedHTLCZ) { }
+impl Drop for CVec_UpdateFailMalformedHTLCZ {
fn drop(&mut self) {
- if self.result_ok {
- if unsafe { !(self.contents.result as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.result) };
- }
- } else {
- if unsafe { !(self.contents.err as *mut ()).is_null() } {
- let _ = unsafe { Box::from_raw(self.contents.err) };
- }
- }
- }
-}
-impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::UnsignedInvoiceRequest, crate::lightning::offers::parse::Bolt12SemanticError>> for CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::UnsignedInvoiceRequest, crate::lightning::offers::parse::Bolt12SemanticError>) -> Self {
- let contents = if o.result_ok {
- let result = unsafe { o.contents.result };
- unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr { result }
- } else {
- let err = unsafe { o.contents.err };
- unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr { err }
- };
- Self {
- contents,
- result_ok: o.result_ok,
- }
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ {
+impl Clone for CVec_UpdateFailMalformedHTLCZ {
fn clone(&self) -> Self {
- if self.result_ok {
- Self { result_ok: true, contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::offers::invoice_request::UnsignedInvoiceRequest>::clone(unsafe { &*self.contents.result })))
- } }
- } else {
- Self { result_ok: false, contents: CResult_UnsignedInvoiceRequestBolt12SemanticErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::offers::parse::Bolt12SemanticError>::clone(unsafe { &*self.contents.err })))
- } }
- }
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
}
}
-#[no_mangle]
-/// Creates a new CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ_clone(orig: &CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ) -> CResult_UnsignedInvoiceRequestBolt12SemanticErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_InvoiceRequestBolt12SemanticErrorZ
-pub union CResult_InvoiceRequestBolt12SemanticErrorZPtr {
+/// The contents of CResult_AcceptChannelDecodeErrorZ
+pub union CResult_AcceptChannelDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::offers::invoice_request::InvoiceRequest,
+ pub result: *mut crate::lightning::ln::msgs::AcceptChannel,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::offers::parse::Bolt12SemanticError,
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_InvoiceRequestBolt12SemanticErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::offers::invoice_request::InvoiceRequest on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+/// A CResult_AcceptChannelDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::AcceptChannel on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_InvoiceRequestBolt12SemanticErrorZ {
- /// The contents of this CResult_InvoiceRequestBolt12SemanticErrorZ, accessible via either
+pub struct CResult_AcceptChannelDecodeErrorZ {
+ /// The contents of this CResult_AcceptChannelDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr,
- /// Whether this CResult_InvoiceRequestBolt12SemanticErrorZ represents a success state.
+ pub contents: CResult_AcceptChannelDecodeErrorZPtr,
+ /// Whether this CResult_AcceptChannelDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the success state.
-pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_ok(o: crate::lightning::offers::invoice_request::InvoiceRequest) -> CResult_InvoiceRequestBolt12SemanticErrorZ {
- CResult_InvoiceRequestBolt12SemanticErrorZ {
- contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr {
+/// Creates a new CResult_AcceptChannelDecodeErrorZ in the success state.
+pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_ok(o: crate::lightning::ln::msgs::AcceptChannel) -> CResult_AcceptChannelDecodeErrorZ {
+ CResult_AcceptChannelDecodeErrorZ {
+ contents: CResult_AcceptChannelDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ in the error state.
-pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_err(e: crate::lightning::offers::parse::Bolt12SemanticError) -> CResult_InvoiceRequestBolt12SemanticErrorZ {
- CResult_InvoiceRequestBolt12SemanticErrorZ {
- contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr {
+/// Creates a new CResult_AcceptChannelDecodeErrorZ in the error state.
+pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_AcceptChannelDecodeErrorZ {
+ CResult_AcceptChannelDecodeErrorZ {
+ contents: CResult_AcceptChannelDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_is_ok(o: &CResult_InvoiceRequestBolt12SemanticErrorZ) -> bool {
+pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_is_ok(o: &CResult_AcceptChannelDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_InvoiceRequestBolt12SemanticErrorZ.
-pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_free(_res: CResult_InvoiceRequestBolt12SemanticErrorZ) { }
-impl Drop for CResult_InvoiceRequestBolt12SemanticErrorZ {
+/// Frees any resources used by the CResult_AcceptChannelDecodeErrorZ.
+pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_free(_res: CResult_AcceptChannelDecodeErrorZ) { }
+impl Drop for CResult_AcceptChannelDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::InvoiceRequest, crate::lightning::offers::parse::Bolt12SemanticError>> for CResult_InvoiceRequestBolt12SemanticErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::InvoiceRequest, crate::lightning::offers::parse::Bolt12SemanticError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::AcceptChannel, crate::lightning::ln::msgs::DecodeError>> for CResult_AcceptChannelDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::AcceptChannel, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_InvoiceRequestBolt12SemanticErrorZPtr { result }
+ CResult_AcceptChannelDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_InvoiceRequestBolt12SemanticErrorZPtr { err }
+ CResult_AcceptChannelDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_InvoiceRequestBolt12SemanticErrorZ {
+impl Clone for CResult_AcceptChannelDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::offers::invoice_request::InvoiceRequest>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_AcceptChannelDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::AcceptChannel>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_InvoiceRequestBolt12SemanticErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::offers::parse::Bolt12SemanticError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_AcceptChannelDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_InvoiceRequestBolt12SemanticErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_InvoiceRequestBolt12SemanticErrorZ_clone(orig: &CResult_InvoiceRequestBolt12SemanticErrorZ) -> CResult_InvoiceRequestBolt12SemanticErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a crate::c_types::SecretKey or not
-pub enum COption_SecretKeyZ {
- /// When we're in this state, this COption_SecretKeyZ contains a crate::c_types::SecretKey
- Some(crate::c_types::SecretKey),
- /// When we're in this state, this COption_SecretKeyZ contains nothing
- None
-}
-impl COption_SecretKeyZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
- }
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
- }
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::c_types::SecretKey {
- if let Self::Some(v) = self { v } else { unreachable!() }
- }
-}
-#[no_mangle]
-/// Constructs a new COption_SecretKeyZ containing a crate::c_types::SecretKey
-pub extern "C" fn COption_SecretKeyZ_some(o: crate::c_types::SecretKey) -> COption_SecretKeyZ {
- COption_SecretKeyZ::Some(o)
-}
-#[no_mangle]
-/// Constructs a new COption_SecretKeyZ containing nothing
-pub extern "C" fn COption_SecretKeyZ_none() -> COption_SecretKeyZ {
- COption_SecretKeyZ::None
-}
-#[no_mangle]
-/// Frees any resources associated with the crate::c_types::SecretKey, if we are in the Some state
-pub extern "C" fn COption_SecretKeyZ_free(_res: COption_SecretKeyZ) { }
-#[no_mangle]
-/// Creates a new COption_SecretKeyZ which has the same data as `orig`
+/// Creates a new CResult_AcceptChannelDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_SecretKeyZ_clone(orig: &COption_SecretKeyZ) -> COption_SecretKeyZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_clone(orig: &CResult_AcceptChannelDecodeErrorZ) -> CResult_AcceptChannelDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ
-pub union CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+/// The contents of CResult_AcceptChannelV2DecodeErrorZ
+pub union CResult_AcceptChannelV2DecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder,
+ pub result: *mut crate::lightning::ln::msgs::AcceptChannelV2,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::offers::parse::Bolt12SemanticError,
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+/// A CResult_AcceptChannelV2DecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::AcceptChannelV2 on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
- /// The contents of this CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ, accessible via either
+pub struct CResult_AcceptChannelV2DecodeErrorZ {
+ /// The contents of this CResult_AcceptChannelV2DecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr,
- /// Whether this CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ represents a success state.
+ pub contents: CResult_AcceptChannelV2DecodeErrorZPtr,
+ /// Whether this CResult_AcceptChannelV2DecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
-pub extern "C" fn CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o: crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder) -> CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
- CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
- contents: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+/// Creates a new CResult_AcceptChannelV2DecodeErrorZ in the success state.
+pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_ok(o: crate::lightning::ln::msgs::AcceptChannelV2) -> CResult_AcceptChannelV2DecodeErrorZ {
+ CResult_AcceptChannelV2DecodeErrorZ {
+ contents: CResult_AcceptChannelV2DecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
-pub extern "C" fn CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_err(e: crate::lightning::offers::parse::Bolt12SemanticError) -> CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
- CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
- contents: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+/// Creates a new CResult_AcceptChannelV2DecodeErrorZ in the error state.
+pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_AcceptChannelV2DecodeErrorZ {
+ CResult_AcceptChannelV2DecodeErrorZ {
+ contents: CResult_AcceptChannelV2DecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o: &CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ) -> bool {
+pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_is_ok(o: &CResult_AcceptChannelV2DecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ.
-pub extern "C" fn CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res: CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ) { }
-impl Drop for CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
+/// Frees any resources used by the CResult_AcceptChannelV2DecodeErrorZ.
+pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_free(_res: CResult_AcceptChannelV2DecodeErrorZ) { }
+impl Drop for CResult_AcceptChannelV2DecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder, crate::lightning::offers::parse::Bolt12SemanticError>> for CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice::InvoiceWithExplicitSigningPubkeyBuilder, crate::lightning::offers::parse::Bolt12SemanticError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::AcceptChannelV2, crate::lightning::ln::msgs::DecodeError>> for CResult_AcceptChannelV2DecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::AcceptChannelV2, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr { result }
+ CResult_AcceptChannelV2DecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_InvoiceWithExplicitSigningPubkeyBuilderBolt12SemanticErrorZPtr { err }
+ CResult_AcceptChannelV2DecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
+impl Clone for CResult_AcceptChannelV2DecodeErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_AcceptChannelV2DecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::AcceptChannelV2>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_AcceptChannelV2DecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_AcceptChannelV2DecodeErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_clone(orig: &CResult_AcceptChannelV2DecodeErrorZ) -> CResult_AcceptChannelV2DecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_VerifiedInvoiceRequestNoneZ
-pub union CResult_VerifiedInvoiceRequestNoneZPtr {
+/// The contents of CResult_StfuDecodeErrorZ
+pub union CResult_StfuDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::offers::invoice_request::VerifiedInvoiceRequest,
- /// Note that this value is always NULL, as there are no contents in the Err variant
- pub err: *mut core::ffi::c_void,
+ pub result: *mut crate::lightning::ln::msgs::Stfu,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_VerifiedInvoiceRequestNoneZ represents the result of a fallible operation,
-/// containing a crate::lightning::offers::invoice_request::VerifiedInvoiceRequest on success and a () on failure.
+/// A CResult_StfuDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::Stfu on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_VerifiedInvoiceRequestNoneZ {
- /// The contents of this CResult_VerifiedInvoiceRequestNoneZ, accessible via either
+pub struct CResult_StfuDecodeErrorZ {
+ /// The contents of this CResult_StfuDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_VerifiedInvoiceRequestNoneZPtr,
- /// Whether this CResult_VerifiedInvoiceRequestNoneZ represents a success state.
+ pub contents: CResult_StfuDecodeErrorZPtr,
+ /// Whether this CResult_StfuDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_VerifiedInvoiceRequestNoneZ in the success state.
-pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_ok(o: crate::lightning::offers::invoice_request::VerifiedInvoiceRequest) -> CResult_VerifiedInvoiceRequestNoneZ {
- CResult_VerifiedInvoiceRequestNoneZ {
- contents: CResult_VerifiedInvoiceRequestNoneZPtr {
+/// Creates a new CResult_StfuDecodeErrorZ in the success state.
+pub extern "C" fn CResult_StfuDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Stfu) -> CResult_StfuDecodeErrorZ {
+ CResult_StfuDecodeErrorZ {
+ contents: CResult_StfuDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_VerifiedInvoiceRequestNoneZ in the error state.
-pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_err() -> CResult_VerifiedInvoiceRequestNoneZ {
- CResult_VerifiedInvoiceRequestNoneZ {
- contents: CResult_VerifiedInvoiceRequestNoneZPtr {
- err: core::ptr::null_mut(),
+/// Creates a new CResult_StfuDecodeErrorZ in the error state.
+pub extern "C" fn CResult_StfuDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_StfuDecodeErrorZ {
+ CResult_StfuDecodeErrorZ {
+ contents: CResult_StfuDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_is_ok(o: &CResult_VerifiedInvoiceRequestNoneZ) -> bool {
+pub extern "C" fn CResult_StfuDecodeErrorZ_is_ok(o: &CResult_StfuDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_VerifiedInvoiceRequestNoneZ.
-pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_free(_res: CResult_VerifiedInvoiceRequestNoneZ) { }
-impl Drop for CResult_VerifiedInvoiceRequestNoneZ {
+/// Frees any resources used by the CResult_StfuDecodeErrorZ.
+pub extern "C" fn CResult_StfuDecodeErrorZ_free(_res: CResult_StfuDecodeErrorZ) { }
+impl Drop for CResult_StfuDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
let _ = unsafe { Box::from_raw(self.contents.result) };
}
} else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::VerifiedInvoiceRequest, ()>> for CResult_VerifiedInvoiceRequestNoneZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::VerifiedInvoiceRequest, ()>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Stfu, crate::lightning::ln::msgs::DecodeError>> for CResult_StfuDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Stfu, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_VerifiedInvoiceRequestNoneZPtr { result }
+ CResult_StfuDecodeErrorZPtr { result }
} else {
- let _ = unsafe { Box::from_raw(o.contents.err) };
- o.contents.err = core::ptr::null_mut();
- CResult_VerifiedInvoiceRequestNoneZPtr { err: core::ptr::null_mut() }
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_StfuDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_VerifiedInvoiceRequestNoneZ {
+impl Clone for CResult_StfuDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_VerifiedInvoiceRequestNoneZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::offers::invoice_request::VerifiedInvoiceRequest>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_StfuDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Stfu>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_VerifiedInvoiceRequestNoneZPtr {
- err: core::ptr::null_mut()
+ Self { result_ok: false, contents: CResult_StfuDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_VerifiedInvoiceRequestNoneZ which has the same data as `orig`
+/// Creates a new CResult_StfuDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_VerifiedInvoiceRequestNoneZ_clone(orig: &CResult_VerifiedInvoiceRequestNoneZ) -> CResult_VerifiedInvoiceRequestNoneZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_StfuDecodeErrorZ_clone(orig: &CResult_StfuDecodeErrorZ) -> CResult_StfuDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ
-pub union CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+/// The contents of CResult_SpliceDecodeErrorZ
+pub union CResult_SpliceDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder,
+ pub result: *mut crate::lightning::ln::msgs::Splice,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::offers::parse::Bolt12SemanticError,
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder on success and a crate::lightning::offers::parse::Bolt12SemanticError on failure.
+/// A CResult_SpliceDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::Splice on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
- /// The contents of this CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ, accessible via either
+pub struct CResult_SpliceDecodeErrorZ {
+ /// The contents of this CResult_SpliceDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr,
- /// Whether this CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ represents a success state.
+ pub contents: CResult_SpliceDecodeErrorZPtr,
+ /// Whether this CResult_SpliceDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the success state.
-pub extern "C" fn CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_ok(o: crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder) -> CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
- CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
- contents: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+/// Creates a new CResult_SpliceDecodeErrorZ in the success state.
+pub extern "C" fn CResult_SpliceDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Splice) -> CResult_SpliceDecodeErrorZ {
+ CResult_SpliceDecodeErrorZ {
+ contents: CResult_SpliceDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ in the error state.
-pub extern "C" fn CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_err(e: crate::lightning::offers::parse::Bolt12SemanticError) -> CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
- CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
- contents: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr {
+/// Creates a new CResult_SpliceDecodeErrorZ in the error state.
+pub extern "C" fn CResult_SpliceDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_SpliceDecodeErrorZ {
+ CResult_SpliceDecodeErrorZ {
+ contents: CResult_SpliceDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_is_ok(o: &CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ) -> bool {
+pub extern "C" fn CResult_SpliceDecodeErrorZ_is_ok(o: &CResult_SpliceDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ.
-pub extern "C" fn CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ_free(_res: CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ) { }
-impl Drop for CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
+/// Frees any resources used by the CResult_SpliceDecodeErrorZ.
+pub extern "C" fn CResult_SpliceDecodeErrorZ_free(_res: CResult_SpliceDecodeErrorZ) { }
+impl Drop for CResult_SpliceDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder, crate::lightning::offers::parse::Bolt12SemanticError>> for CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice::InvoiceWithDerivedSigningPubkeyBuilder, crate::lightning::offers::parse::Bolt12SemanticError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Splice, crate::lightning::ln::msgs::DecodeError>> for CResult_SpliceDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Splice, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr { result }
+ CResult_SpliceDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_InvoiceWithDerivedSigningPubkeyBuilderBolt12SemanticErrorZPtr { err }
+ CResult_SpliceDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
+impl Clone for CResult_SpliceDecodeErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_SpliceDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Splice>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_SpliceDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_SpliceDecodeErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_SpliceDecodeErrorZ_clone(orig: &CResult_SpliceDecodeErrorZ) -> CResult_SpliceDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_InvoiceRequestFieldsDecodeErrorZ
-pub union CResult_InvoiceRequestFieldsDecodeErrorZPtr {
+/// The contents of CResult_SpliceAckDecodeErrorZ
+pub union CResult_SpliceAckDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::offers::invoice_request::InvoiceRequestFields,
+ pub result: *mut crate::lightning::ln::msgs::SpliceAck,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_InvoiceRequestFieldsDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::offers::invoice_request::InvoiceRequestFields on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_SpliceAckDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::SpliceAck on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_InvoiceRequestFieldsDecodeErrorZ {
- /// The contents of this CResult_InvoiceRequestFieldsDecodeErrorZ, accessible via either
+pub struct CResult_SpliceAckDecodeErrorZ {
+ /// The contents of this CResult_SpliceAckDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr,
- /// Whether this CResult_InvoiceRequestFieldsDecodeErrorZ represents a success state.
+ pub contents: CResult_SpliceAckDecodeErrorZPtr,
+ /// Whether this CResult_SpliceAckDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the success state.
-pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_ok(o: crate::lightning::offers::invoice_request::InvoiceRequestFields) -> CResult_InvoiceRequestFieldsDecodeErrorZ {
- CResult_InvoiceRequestFieldsDecodeErrorZ {
- contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr {
+/// Creates a new CResult_SpliceAckDecodeErrorZ in the success state.
+pub extern "C" fn CResult_SpliceAckDecodeErrorZ_ok(o: crate::lightning::ln::msgs::SpliceAck) -> CResult_SpliceAckDecodeErrorZ {
+ CResult_SpliceAckDecodeErrorZ {
+ contents: CResult_SpliceAckDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
- }
-}
-#[no_mangle]
-/// Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ in the error state.
-pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_InvoiceRequestFieldsDecodeErrorZ {
- CResult_InvoiceRequestFieldsDecodeErrorZ {
- contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr {
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_SpliceAckDecodeErrorZ in the error state.
+pub extern "C" fn CResult_SpliceAckDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_SpliceAckDecodeErrorZ {
+ CResult_SpliceAckDecodeErrorZ {
+ contents: CResult_SpliceAckDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_is_ok(o: &CResult_InvoiceRequestFieldsDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_SpliceAckDecodeErrorZ_is_ok(o: &CResult_SpliceAckDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_InvoiceRequestFieldsDecodeErrorZ.
-pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_free(_res: CResult_InvoiceRequestFieldsDecodeErrorZ) { }
-impl Drop for CResult_InvoiceRequestFieldsDecodeErrorZ {
+/// Frees any resources used by the CResult_SpliceAckDecodeErrorZ.
+pub extern "C" fn CResult_SpliceAckDecodeErrorZ_free(_res: CResult_SpliceAckDecodeErrorZ) { }
+impl Drop for CResult_SpliceAckDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::InvoiceRequestFields, crate::lightning::ln::msgs::DecodeError>> for CResult_InvoiceRequestFieldsDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::offers::invoice_request::InvoiceRequestFields, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::SpliceAck, crate::lightning::ln::msgs::DecodeError>> for CResult_SpliceAckDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::SpliceAck, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_InvoiceRequestFieldsDecodeErrorZPtr { result }
+ CResult_SpliceAckDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_InvoiceRequestFieldsDecodeErrorZPtr { err }
+ CResult_SpliceAckDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_InvoiceRequestFieldsDecodeErrorZ {
+impl Clone for CResult_SpliceAckDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::offers::invoice_request::InvoiceRequestFields>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_SpliceAckDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SpliceAck>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_InvoiceRequestFieldsDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_SpliceAckDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_InvoiceRequestFieldsDecodeErrorZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_InvoiceRequestFieldsDecodeErrorZ_clone(orig: &CResult_InvoiceRequestFieldsDecodeErrorZ) -> CResult_InvoiceRequestFieldsDecodeErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// An enum which can either contain a or not
-pub enum COption_NoneZ {
- /// When we're in this state, this COption_NoneZ contains a
- Some,
- /// When we're in this state, this COption_NoneZ contains nothing
- None
-}
-impl COption_NoneZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
- }
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
- }
-}
-#[no_mangle]
-/// Constructs a new COption_NoneZ containing a
-pub extern "C" fn COption_NoneZ_some() -> COption_NoneZ {
- COption_NoneZ::Some
-}
-#[no_mangle]
-/// Constructs a new COption_NoneZ containing nothing
-pub extern "C" fn COption_NoneZ_none() -> COption_NoneZ {
- COption_NoneZ::None
-}
-#[no_mangle]
-/// Frees any resources associated with the , if we are in the Some state
-pub extern "C" fn COption_NoneZ_free(_res: COption_NoneZ) { }
-#[repr(C)]
-/// A dynamically-allocated array of crate::c_types::Witnesss of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_WitnessZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::c_types::Witness,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
-}
-impl CVec_WitnessZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::c_types::Witness> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::c_types::Witness] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
- }
-}
-impl From<Vec<crate::c_types::Witness>> for CVec_WitnessZ {
- fn from(v: Vec<crate::c_types::Witness>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
- }
-}
-#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_WitnessZ_free(_res: CVec_WitnessZ) { }
-impl Drop for CVec_WitnessZ {
- fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
- }
-}
-impl Clone for CVec_WitnessZ {
- fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
- }
-}
-#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a crate::c_types::ECDSASignature or not
-pub enum COption_ECDSASignatureZ {
- /// When we're in this state, this COption_ECDSASignatureZ contains a crate::c_types::ECDSASignature
- Some(crate::c_types::ECDSASignature),
- /// When we're in this state, this COption_ECDSASignatureZ contains nothing
- None
-}
-impl COption_ECDSASignatureZ {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
- }
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
- }
- #[allow(unused)] pub(crate) fn take(mut self) -> crate::c_types::ECDSASignature {
- if let Self::Some(v) = self { v } else { unreachable!() }
- }
-}
-#[no_mangle]
-/// Constructs a new COption_ECDSASignatureZ containing a crate::c_types::ECDSASignature
-pub extern "C" fn COption_ECDSASignatureZ_some(o: crate::c_types::ECDSASignature) -> COption_ECDSASignatureZ {
- COption_ECDSASignatureZ::Some(o)
-}
-#[no_mangle]
-/// Constructs a new COption_ECDSASignatureZ containing nothing
-pub extern "C" fn COption_ECDSASignatureZ_none() -> COption_ECDSASignatureZ {
- COption_ECDSASignatureZ::None
-}
-#[no_mangle]
-/// Frees any resources associated with the crate::c_types::ECDSASignature, if we are in the Some state
-pub extern "C" fn COption_ECDSASignatureZ_free(_res: COption_ECDSASignatureZ) { }
-#[no_mangle]
-/// Creates a new COption_ECDSASignatureZ which has the same data as `orig`
-/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_ECDSASignatureZ_clone(orig: &COption_ECDSASignatureZ) -> COption_ECDSASignatureZ { Clone::clone(&orig) }
-#[repr(C)]
-#[derive(Clone)]
-/// An enum which can either contain a i64 or not
-pub enum COption_i64Z {
- /// When we're in this state, this COption_i64Z contains a i64
- Some(i64),
- /// When we're in this state, this COption_i64Z contains nothing
- None
-}
-impl COption_i64Z {
- #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
- if let Self::None = self { false } else { true }
- }
- #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
- !self.is_some()
- }
- #[allow(unused)] pub(crate) fn take(mut self) -> i64 {
- if let Self::Some(v) = self { v } else { unreachable!() }
- }
-}
-#[no_mangle]
-/// Constructs a new COption_i64Z containing a i64
-pub extern "C" fn COption_i64Z_some(o: i64) -> COption_i64Z {
- COption_i64Z::Some(o)
-}
-#[no_mangle]
-/// Constructs a new COption_i64Z containing nothing
-pub extern "C" fn COption_i64Z_none() -> COption_i64Z {
- COption_i64Z::None
-}
-#[no_mangle]
-/// Frees any resources associated with the i64, if we are in the Some state
-pub extern "C" fn COption_i64Z_free(_res: COption_i64Z) { }
-#[no_mangle]
-/// Creates a new COption_i64Z which has the same data as `orig`
+/// Creates a new CResult_SpliceAckDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn COption_i64Z_clone(orig: &COption_i64Z) -> COption_i64Z { Clone::clone(&orig) }
+pub extern "C" fn CResult_SpliceAckDecodeErrorZ_clone(orig: &CResult_SpliceAckDecodeErrorZ) -> CResult_SpliceAckDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_SocketAddressDecodeErrorZ
-pub union CResult_SocketAddressDecodeErrorZPtr {
+/// The contents of CResult_SpliceLockedDecodeErrorZ
+pub union CResult_SpliceLockedDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::SocketAddress,
+ pub result: *mut crate::lightning::ln::msgs::SpliceLocked,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_SocketAddressDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::SocketAddress on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_SpliceLockedDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::SpliceLocked on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_SocketAddressDecodeErrorZ {
- /// The contents of this CResult_SocketAddressDecodeErrorZ, accessible via either
+pub struct CResult_SpliceLockedDecodeErrorZ {
+ /// The contents of this CResult_SpliceLockedDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_SocketAddressDecodeErrorZPtr,
- /// Whether this CResult_SocketAddressDecodeErrorZ represents a success state.
+ pub contents: CResult_SpliceLockedDecodeErrorZPtr,
+ /// Whether this CResult_SpliceLockedDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_SocketAddressDecodeErrorZ in the success state.
-pub extern "C" fn CResult_SocketAddressDecodeErrorZ_ok(o: crate::lightning::ln::msgs::SocketAddress) -> CResult_SocketAddressDecodeErrorZ {
- CResult_SocketAddressDecodeErrorZ {
- contents: CResult_SocketAddressDecodeErrorZPtr {
+/// Creates a new CResult_SpliceLockedDecodeErrorZ in the success state.
+pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::SpliceLocked) -> CResult_SpliceLockedDecodeErrorZ {
+ CResult_SpliceLockedDecodeErrorZ {
+ contents: CResult_SpliceLockedDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_SocketAddressDecodeErrorZ in the error state.
-pub extern "C" fn CResult_SocketAddressDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_SocketAddressDecodeErrorZ {
- CResult_SocketAddressDecodeErrorZ {
- contents: CResult_SocketAddressDecodeErrorZPtr {
+/// Creates a new CResult_SpliceLockedDecodeErrorZ in the error state.
+pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_SpliceLockedDecodeErrorZ {
+ CResult_SpliceLockedDecodeErrorZ {
+ contents: CResult_SpliceLockedDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_SocketAddressDecodeErrorZ_is_ok(o: &CResult_SocketAddressDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_is_ok(o: &CResult_SpliceLockedDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_SocketAddressDecodeErrorZ.
-pub extern "C" fn CResult_SocketAddressDecodeErrorZ_free(_res: CResult_SocketAddressDecodeErrorZ) { }
-impl Drop for CResult_SocketAddressDecodeErrorZ {
+/// Frees any resources used by the CResult_SpliceLockedDecodeErrorZ.
+pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_free(_res: CResult_SpliceLockedDecodeErrorZ) { }
+impl Drop for CResult_SpliceLockedDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::SocketAddress, crate::lightning::ln::msgs::DecodeError>> for CResult_SocketAddressDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::SocketAddress, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::SpliceLocked, crate::lightning::ln::msgs::DecodeError>> for CResult_SpliceLockedDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::SpliceLocked, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_SocketAddressDecodeErrorZPtr { result }
+ CResult_SpliceLockedDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_SocketAddressDecodeErrorZPtr { err }
+ CResult_SpliceLockedDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_SocketAddressDecodeErrorZ {
+impl Clone for CResult_SpliceLockedDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_SocketAddressDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SocketAddress>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_SpliceLockedDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SpliceLocked>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_SocketAddressDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_SpliceLockedDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_SocketAddressDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_SpliceLockedDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_SocketAddressDecodeErrorZ_clone(orig: &CResult_SocketAddressDecodeErrorZ) -> CResult_SocketAddressDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_clone(orig: &CResult_SpliceLockedDecodeErrorZ) -> CResult_SpliceLockedDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_SocketAddressSocketAddressParseErrorZ
-pub union CResult_SocketAddressSocketAddressParseErrorZPtr {
+/// The contents of CResult_TxAddInputDecodeErrorZ
+pub union CResult_TxAddInputDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::SocketAddress,
+ pub result: *mut crate::lightning::ln::msgs::TxAddInput,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::SocketAddressParseError,
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_SocketAddressSocketAddressParseErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::SocketAddress on success and a crate::lightning::ln::msgs::SocketAddressParseError on failure.
+/// A CResult_TxAddInputDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxAddInput on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_SocketAddressSocketAddressParseErrorZ {
- /// The contents of this CResult_SocketAddressSocketAddressParseErrorZ, accessible via either
+pub struct CResult_TxAddInputDecodeErrorZ {
+ /// The contents of this CResult_TxAddInputDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_SocketAddressSocketAddressParseErrorZPtr,
- /// Whether this CResult_SocketAddressSocketAddressParseErrorZ represents a success state.
+ pub contents: CResult_TxAddInputDecodeErrorZPtr,
+ /// Whether this CResult_TxAddInputDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_SocketAddressSocketAddressParseErrorZ in the success state.
-pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_ok(o: crate::lightning::ln::msgs::SocketAddress) -> CResult_SocketAddressSocketAddressParseErrorZ {
- CResult_SocketAddressSocketAddressParseErrorZ {
- contents: CResult_SocketAddressSocketAddressParseErrorZPtr {
+/// Creates a new CResult_TxAddInputDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxAddInputDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxAddInput) -> CResult_TxAddInputDecodeErrorZ {
+ CResult_TxAddInputDecodeErrorZ {
+ contents: CResult_TxAddInputDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_SocketAddressSocketAddressParseErrorZ in the error state.
-pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_err(e: crate::lightning::ln::msgs::SocketAddressParseError) -> CResult_SocketAddressSocketAddressParseErrorZ {
- CResult_SocketAddressSocketAddressParseErrorZ {
- contents: CResult_SocketAddressSocketAddressParseErrorZPtr {
+/// Creates a new CResult_TxAddInputDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxAddInputDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxAddInputDecodeErrorZ {
+ CResult_TxAddInputDecodeErrorZ {
+ contents: CResult_TxAddInputDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_is_ok(o: &CResult_SocketAddressSocketAddressParseErrorZ) -> bool {
+pub extern "C" fn CResult_TxAddInputDecodeErrorZ_is_ok(o: &CResult_TxAddInputDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_SocketAddressSocketAddressParseErrorZ.
-pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_free(_res: CResult_SocketAddressSocketAddressParseErrorZ) { }
-impl Drop for CResult_SocketAddressSocketAddressParseErrorZ {
+/// Frees any resources used by the CResult_TxAddInputDecodeErrorZ.
+pub extern "C" fn CResult_TxAddInputDecodeErrorZ_free(_res: CResult_TxAddInputDecodeErrorZ) { }
+impl Drop for CResult_TxAddInputDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::SocketAddress, crate::lightning::ln::msgs::SocketAddressParseError>> for CResult_SocketAddressSocketAddressParseErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::SocketAddress, crate::lightning::ln::msgs::SocketAddressParseError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAddInput, crate::lightning::ln::msgs::DecodeError>> for CResult_TxAddInputDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAddInput, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_SocketAddressSocketAddressParseErrorZPtr { result }
+ CResult_TxAddInputDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_SocketAddressSocketAddressParseErrorZPtr { err }
+ CResult_TxAddInputDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_SocketAddressSocketAddressParseErrorZ {
+impl Clone for CResult_TxAddInputDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_SocketAddressSocketAddressParseErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SocketAddress>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxAddInputDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxAddInput>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_SocketAddressSocketAddressParseErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SocketAddressParseError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_TxAddInputDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_SocketAddressSocketAddressParseErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxAddInputDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_SocketAddressSocketAddressParseErrorZ_clone(orig: &CResult_SocketAddressSocketAddressParseErrorZ) -> CResult_SocketAddressSocketAddressParseErrorZ { Clone::clone(&orig) }
-#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::ln::msgs::UpdateAddHTLCs of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_UpdateAddHTLCZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::ln::msgs::UpdateAddHTLC,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
-}
-impl CVec_UpdateAddHTLCZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::msgs::UpdateAddHTLC> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::msgs::UpdateAddHTLC] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
- }
-}
-impl From<Vec<crate::lightning::ln::msgs::UpdateAddHTLC>> for CVec_UpdateAddHTLCZ {
- fn from(v: Vec<crate::lightning::ln::msgs::UpdateAddHTLC>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
- }
-}
-#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_UpdateAddHTLCZ_free(_res: CVec_UpdateAddHTLCZ) { }
-impl Drop for CVec_UpdateAddHTLCZ {
- fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
- }
-}
-impl Clone for CVec_UpdateAddHTLCZ {
- fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
- }
-}
-#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFulfillHTLCs of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_UpdateFulfillHTLCZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::ln::msgs::UpdateFulfillHTLC,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
-}
-impl CVec_UpdateFulfillHTLCZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::msgs::UpdateFulfillHTLC> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::msgs::UpdateFulfillHTLC] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
- }
-}
-impl From<Vec<crate::lightning::ln::msgs::UpdateFulfillHTLC>> for CVec_UpdateFulfillHTLCZ {
- fn from(v: Vec<crate::lightning::ln::msgs::UpdateFulfillHTLC>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
- }
-}
-#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_UpdateFulfillHTLCZ_free(_res: CVec_UpdateFulfillHTLCZ) { }
-impl Drop for CVec_UpdateFulfillHTLCZ {
- fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
- }
-}
-impl Clone for CVec_UpdateFulfillHTLCZ {
- fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
- }
-}
-#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailHTLCs of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_UpdateFailHTLCZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::ln::msgs::UpdateFailHTLC,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
-}
-impl CVec_UpdateFailHTLCZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::msgs::UpdateFailHTLC> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::msgs::UpdateFailHTLC] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
- }
-}
-impl From<Vec<crate::lightning::ln::msgs::UpdateFailHTLC>> for CVec_UpdateFailHTLCZ {
- fn from(v: Vec<crate::lightning::ln::msgs::UpdateFailHTLC>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
- }
-}
-#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_UpdateFailHTLCZ_free(_res: CVec_UpdateFailHTLCZ) { }
-impl Drop for CVec_UpdateFailHTLCZ {
- fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
- }
-}
-impl Clone for CVec_UpdateFailHTLCZ {
- fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
- }
-}
-#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailMalformedHTLCs of arbitrary size.
-/// This corresponds to std::vector in C++
-pub struct CVec_UpdateFailMalformedHTLCZ {
- /// The elements in the array.
- /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::ln::msgs::UpdateFailMalformedHTLC,
- /// The number of elements pointed to by `data`.
- pub datalen: usize
-}
-impl CVec_UpdateFailMalformedHTLCZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::msgs::UpdateFailMalformedHTLC> {
- if self.datalen == 0 { return Vec::new(); }
- let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
- self.data = core::ptr::null_mut();
- self.datalen = 0;
- ret
- }
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::msgs::UpdateFailMalformedHTLC] {
- unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
- }
-}
-impl From<Vec<crate::lightning::ln::msgs::UpdateFailMalformedHTLC>> for CVec_UpdateFailMalformedHTLCZ {
- fn from(v: Vec<crate::lightning::ln::msgs::UpdateFailMalformedHTLC>) -> Self {
- let datalen = v.len();
- let data = Box::into_raw(v.into_boxed_slice());
- Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
- }
-}
-#[no_mangle]
-/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_UpdateFailMalformedHTLCZ_free(_res: CVec_UpdateFailMalformedHTLCZ) { }
-impl Drop for CVec_UpdateFailMalformedHTLCZ {
- fn drop(&mut self) {
- if self.datalen == 0 { return; }
- let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
- }
-}
-impl Clone for CVec_UpdateFailMalformedHTLCZ {
- fn clone(&self) -> Self {
- let mut res = Vec::new();
- if self.datalen == 0 { return Self::from(res); }
- res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
- Self::from(res)
- }
-}
+pub extern "C" fn CResult_TxAddInputDecodeErrorZ_clone(orig: &CResult_TxAddInputDecodeErrorZ) -> CResult_TxAddInputDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_AcceptChannelDecodeErrorZ
-pub union CResult_AcceptChannelDecodeErrorZPtr {
+/// The contents of CResult_TxAddOutputDecodeErrorZ
+pub union CResult_TxAddOutputDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::AcceptChannel,
+ pub result: *mut crate::lightning::ln::msgs::TxAddOutput,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_AcceptChannelDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::AcceptChannel on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_TxAddOutputDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxAddOutput on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_AcceptChannelDecodeErrorZ {
- /// The contents of this CResult_AcceptChannelDecodeErrorZ, accessible via either
+pub struct CResult_TxAddOutputDecodeErrorZ {
+ /// The contents of this CResult_TxAddOutputDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_AcceptChannelDecodeErrorZPtr,
- /// Whether this CResult_AcceptChannelDecodeErrorZ represents a success state.
+ pub contents: CResult_TxAddOutputDecodeErrorZPtr,
+ /// Whether this CResult_TxAddOutputDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_AcceptChannelDecodeErrorZ in the success state.
-pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_ok(o: crate::lightning::ln::msgs::AcceptChannel) -> CResult_AcceptChannelDecodeErrorZ {
- CResult_AcceptChannelDecodeErrorZ {
- contents: CResult_AcceptChannelDecodeErrorZPtr {
+/// Creates a new CResult_TxAddOutputDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxAddOutput) -> CResult_TxAddOutputDecodeErrorZ {
+ CResult_TxAddOutputDecodeErrorZ {
+ contents: CResult_TxAddOutputDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_AcceptChannelDecodeErrorZ in the error state.
-pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_AcceptChannelDecodeErrorZ {
- CResult_AcceptChannelDecodeErrorZ {
- contents: CResult_AcceptChannelDecodeErrorZPtr {
+/// Creates a new CResult_TxAddOutputDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxAddOutputDecodeErrorZ {
+ CResult_TxAddOutputDecodeErrorZ {
+ contents: CResult_TxAddOutputDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_is_ok(o: &CResult_AcceptChannelDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_is_ok(o: &CResult_TxAddOutputDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_AcceptChannelDecodeErrorZ.
-pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_free(_res: CResult_AcceptChannelDecodeErrorZ) { }
-impl Drop for CResult_AcceptChannelDecodeErrorZ {
+/// Frees any resources used by the CResult_TxAddOutputDecodeErrorZ.
+pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_free(_res: CResult_TxAddOutputDecodeErrorZ) { }
+impl Drop for CResult_TxAddOutputDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::AcceptChannel, crate::lightning::ln::msgs::DecodeError>> for CResult_AcceptChannelDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::AcceptChannel, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAddOutput, crate::lightning::ln::msgs::DecodeError>> for CResult_TxAddOutputDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAddOutput, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_AcceptChannelDecodeErrorZPtr { result }
+ CResult_TxAddOutputDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_AcceptChannelDecodeErrorZPtr { err }
+ CResult_TxAddOutputDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_AcceptChannelDecodeErrorZ {
+impl Clone for CResult_TxAddOutputDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_AcceptChannelDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::AcceptChannel>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxAddOutputDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxAddOutput>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_AcceptChannelDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_TxAddOutputDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_AcceptChannelDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxAddOutputDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_AcceptChannelDecodeErrorZ_clone(orig: &CResult_AcceptChannelDecodeErrorZ) -> CResult_AcceptChannelDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_clone(orig: &CResult_TxAddOutputDecodeErrorZ) -> CResult_TxAddOutputDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_AcceptChannelV2DecodeErrorZ
-pub union CResult_AcceptChannelV2DecodeErrorZPtr {
+/// The contents of CResult_TxRemoveInputDecodeErrorZ
+pub union CResult_TxRemoveInputDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::AcceptChannelV2,
+ pub result: *mut crate::lightning::ln::msgs::TxRemoveInput,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_AcceptChannelV2DecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::AcceptChannelV2 on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_TxRemoveInputDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxRemoveInput on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_AcceptChannelV2DecodeErrorZ {
- /// The contents of this CResult_AcceptChannelV2DecodeErrorZ, accessible via either
+pub struct CResult_TxRemoveInputDecodeErrorZ {
+ /// The contents of this CResult_TxRemoveInputDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_AcceptChannelV2DecodeErrorZPtr,
- /// Whether this CResult_AcceptChannelV2DecodeErrorZ represents a success state.
+ pub contents: CResult_TxRemoveInputDecodeErrorZPtr,
+ /// Whether this CResult_TxRemoveInputDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_AcceptChannelV2DecodeErrorZ in the success state.
-pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_ok(o: crate::lightning::ln::msgs::AcceptChannelV2) -> CResult_AcceptChannelV2DecodeErrorZ {
- CResult_AcceptChannelV2DecodeErrorZ {
- contents: CResult_AcceptChannelV2DecodeErrorZPtr {
+/// Creates a new CResult_TxRemoveInputDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxRemoveInput) -> CResult_TxRemoveInputDecodeErrorZ {
+ CResult_TxRemoveInputDecodeErrorZ {
+ contents: CResult_TxRemoveInputDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_AcceptChannelV2DecodeErrorZ in the error state.
-pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_AcceptChannelV2DecodeErrorZ {
- CResult_AcceptChannelV2DecodeErrorZ {
- contents: CResult_AcceptChannelV2DecodeErrorZPtr {
+/// Creates a new CResult_TxRemoveInputDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxRemoveInputDecodeErrorZ {
+ CResult_TxRemoveInputDecodeErrorZ {
+ contents: CResult_TxRemoveInputDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_is_ok(o: &CResult_AcceptChannelV2DecodeErrorZ) -> bool {
+pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_is_ok(o: &CResult_TxRemoveInputDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_AcceptChannelV2DecodeErrorZ.
-pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_free(_res: CResult_AcceptChannelV2DecodeErrorZ) { }
-impl Drop for CResult_AcceptChannelV2DecodeErrorZ {
+/// Frees any resources used by the CResult_TxRemoveInputDecodeErrorZ.
+pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_free(_res: CResult_TxRemoveInputDecodeErrorZ) { }
+impl Drop for CResult_TxRemoveInputDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::AcceptChannelV2, crate::lightning::ln::msgs::DecodeError>> for CResult_AcceptChannelV2DecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::AcceptChannelV2, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxRemoveInput, crate::lightning::ln::msgs::DecodeError>> for CResult_TxRemoveInputDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxRemoveInput, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_AcceptChannelV2DecodeErrorZPtr { result }
+ CResult_TxRemoveInputDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_AcceptChannelV2DecodeErrorZPtr { err }
+ CResult_TxRemoveInputDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_AcceptChannelV2DecodeErrorZ {
+impl Clone for CResult_TxRemoveInputDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_AcceptChannelV2DecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::AcceptChannelV2>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxRemoveInputDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxRemoveInput>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_AcceptChannelV2DecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_TxRemoveInputDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_AcceptChannelV2DecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxRemoveInputDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_AcceptChannelV2DecodeErrorZ_clone(orig: &CResult_AcceptChannelV2DecodeErrorZ) -> CResult_AcceptChannelV2DecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_clone(orig: &CResult_TxRemoveInputDecodeErrorZ) -> CResult_TxRemoveInputDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_StfuDecodeErrorZ
-pub union CResult_StfuDecodeErrorZPtr {
+/// The contents of CResult_TxRemoveOutputDecodeErrorZ
+pub union CResult_TxRemoveOutputDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::Stfu,
+ pub result: *mut crate::lightning::ln::msgs::TxRemoveOutput,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_StfuDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::Stfu on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_TxRemoveOutputDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxRemoveOutput on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_StfuDecodeErrorZ {
- /// The contents of this CResult_StfuDecodeErrorZ, accessible via either
+pub struct CResult_TxRemoveOutputDecodeErrorZ {
+ /// The contents of this CResult_TxRemoveOutputDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_StfuDecodeErrorZPtr,
- /// Whether this CResult_StfuDecodeErrorZ represents a success state.
+ pub contents: CResult_TxRemoveOutputDecodeErrorZPtr,
+ /// Whether this CResult_TxRemoveOutputDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_StfuDecodeErrorZ in the success state.
-pub extern "C" fn CResult_StfuDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Stfu) -> CResult_StfuDecodeErrorZ {
- CResult_StfuDecodeErrorZ {
- contents: CResult_StfuDecodeErrorZPtr {
+/// Creates a new CResult_TxRemoveOutputDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxRemoveOutput) -> CResult_TxRemoveOutputDecodeErrorZ {
+ CResult_TxRemoveOutputDecodeErrorZ {
+ contents: CResult_TxRemoveOutputDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_StfuDecodeErrorZ in the error state.
-pub extern "C" fn CResult_StfuDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_StfuDecodeErrorZ {
- CResult_StfuDecodeErrorZ {
- contents: CResult_StfuDecodeErrorZPtr {
+/// Creates a new CResult_TxRemoveOutputDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxRemoveOutputDecodeErrorZ {
+ CResult_TxRemoveOutputDecodeErrorZ {
+ contents: CResult_TxRemoveOutputDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_StfuDecodeErrorZ_is_ok(o: &CResult_StfuDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_is_ok(o: &CResult_TxRemoveOutputDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_StfuDecodeErrorZ.
-pub extern "C" fn CResult_StfuDecodeErrorZ_free(_res: CResult_StfuDecodeErrorZ) { }
-impl Drop for CResult_StfuDecodeErrorZ {
+/// Frees any resources used by the CResult_TxRemoveOutputDecodeErrorZ.
+pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_free(_res: CResult_TxRemoveOutputDecodeErrorZ) { }
+impl Drop for CResult_TxRemoveOutputDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Stfu, crate::lightning::ln::msgs::DecodeError>> for CResult_StfuDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Stfu, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxRemoveOutput, crate::lightning::ln::msgs::DecodeError>> for CResult_TxRemoveOutputDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxRemoveOutput, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_StfuDecodeErrorZPtr { result }
+ CResult_TxRemoveOutputDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_StfuDecodeErrorZPtr { err }
+ CResult_TxRemoveOutputDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_StfuDecodeErrorZ {
+impl Clone for CResult_TxRemoveOutputDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_StfuDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Stfu>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxRemoveOutputDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxRemoveOutput>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_StfuDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_TxRemoveOutputDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_StfuDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxRemoveOutputDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_StfuDecodeErrorZ_clone(orig: &CResult_StfuDecodeErrorZ) -> CResult_StfuDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_clone(orig: &CResult_TxRemoveOutputDecodeErrorZ) -> CResult_TxRemoveOutputDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_SpliceDecodeErrorZ
-pub union CResult_SpliceDecodeErrorZPtr {
+/// The contents of CResult_TxCompleteDecodeErrorZ
+pub union CResult_TxCompleteDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::Splice,
+ pub result: *mut crate::lightning::ln::msgs::TxComplete,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_SpliceDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::Splice on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_TxCompleteDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxComplete on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_SpliceDecodeErrorZ {
- /// The contents of this CResult_SpliceDecodeErrorZ, accessible via either
+pub struct CResult_TxCompleteDecodeErrorZ {
+ /// The contents of this CResult_TxCompleteDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_SpliceDecodeErrorZPtr,
- /// Whether this CResult_SpliceDecodeErrorZ represents a success state.
+ pub contents: CResult_TxCompleteDecodeErrorZPtr,
+ /// Whether this CResult_TxCompleteDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_SpliceDecodeErrorZ in the success state.
-pub extern "C" fn CResult_SpliceDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Splice) -> CResult_SpliceDecodeErrorZ {
- CResult_SpliceDecodeErrorZ {
- contents: CResult_SpliceDecodeErrorZPtr {
+/// Creates a new CResult_TxCompleteDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxCompleteDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxComplete) -> CResult_TxCompleteDecodeErrorZ {
+ CResult_TxCompleteDecodeErrorZ {
+ contents: CResult_TxCompleteDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_SpliceDecodeErrorZ in the error state.
-pub extern "C" fn CResult_SpliceDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_SpliceDecodeErrorZ {
- CResult_SpliceDecodeErrorZ {
- contents: CResult_SpliceDecodeErrorZPtr {
+/// Creates a new CResult_TxCompleteDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxCompleteDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxCompleteDecodeErrorZ {
+ CResult_TxCompleteDecodeErrorZ {
+ contents: CResult_TxCompleteDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_SpliceDecodeErrorZ_is_ok(o: &CResult_SpliceDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_TxCompleteDecodeErrorZ_is_ok(o: &CResult_TxCompleteDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_SpliceDecodeErrorZ.
-pub extern "C" fn CResult_SpliceDecodeErrorZ_free(_res: CResult_SpliceDecodeErrorZ) { }
-impl Drop for CResult_SpliceDecodeErrorZ {
+/// Frees any resources used by the CResult_TxCompleteDecodeErrorZ.
+pub extern "C" fn CResult_TxCompleteDecodeErrorZ_free(_res: CResult_TxCompleteDecodeErrorZ) { }
+impl Drop for CResult_TxCompleteDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Splice, crate::lightning::ln::msgs::DecodeError>> for CResult_SpliceDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Splice, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxComplete, crate::lightning::ln::msgs::DecodeError>> for CResult_TxCompleteDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxComplete, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_SpliceDecodeErrorZPtr { result }
+ CResult_TxCompleteDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_SpliceDecodeErrorZPtr { err }
+ CResult_TxCompleteDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_SpliceDecodeErrorZ {
+impl Clone for CResult_TxCompleteDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_SpliceDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Splice>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxCompleteDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxComplete>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_SpliceDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_TxCompleteDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_SpliceDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxCompleteDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_SpliceDecodeErrorZ_clone(orig: &CResult_SpliceDecodeErrorZ) -> CResult_SpliceDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_TxCompleteDecodeErrorZ_clone(orig: &CResult_TxCompleteDecodeErrorZ) -> CResult_TxCompleteDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_SpliceAckDecodeErrorZ
-pub union CResult_SpliceAckDecodeErrorZPtr {
+/// The contents of CResult_TxSignaturesDecodeErrorZ
+pub union CResult_TxSignaturesDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::SpliceAck,
+ pub result: *mut crate::lightning::ln::msgs::TxSignatures,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_SpliceAckDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::SpliceAck on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_TxSignaturesDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxSignatures on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_SpliceAckDecodeErrorZ {
- /// The contents of this CResult_SpliceAckDecodeErrorZ, accessible via either
+pub struct CResult_TxSignaturesDecodeErrorZ {
+ /// The contents of this CResult_TxSignaturesDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_SpliceAckDecodeErrorZPtr,
- /// Whether this CResult_SpliceAckDecodeErrorZ represents a success state.
+ pub contents: CResult_TxSignaturesDecodeErrorZPtr,
+ /// Whether this CResult_TxSignaturesDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_SpliceAckDecodeErrorZ in the success state.
-pub extern "C" fn CResult_SpliceAckDecodeErrorZ_ok(o: crate::lightning::ln::msgs::SpliceAck) -> CResult_SpliceAckDecodeErrorZ {
- CResult_SpliceAckDecodeErrorZ {
- contents: CResult_SpliceAckDecodeErrorZPtr {
+/// Creates a new CResult_TxSignaturesDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxSignatures) -> CResult_TxSignaturesDecodeErrorZ {
+ CResult_TxSignaturesDecodeErrorZ {
+ contents: CResult_TxSignaturesDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_SpliceAckDecodeErrorZ in the error state.
-pub extern "C" fn CResult_SpliceAckDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_SpliceAckDecodeErrorZ {
- CResult_SpliceAckDecodeErrorZ {
- contents: CResult_SpliceAckDecodeErrorZPtr {
+/// Creates a new CResult_TxSignaturesDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxSignaturesDecodeErrorZ {
+ CResult_TxSignaturesDecodeErrorZ {
+ contents: CResult_TxSignaturesDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_SpliceAckDecodeErrorZ_is_ok(o: &CResult_SpliceAckDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_is_ok(o: &CResult_TxSignaturesDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_SpliceAckDecodeErrorZ.
-pub extern "C" fn CResult_SpliceAckDecodeErrorZ_free(_res: CResult_SpliceAckDecodeErrorZ) { }
-impl Drop for CResult_SpliceAckDecodeErrorZ {
+/// Frees any resources used by the CResult_TxSignaturesDecodeErrorZ.
+pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_free(_res: CResult_TxSignaturesDecodeErrorZ) { }
+impl Drop for CResult_TxSignaturesDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::SpliceAck, crate::lightning::ln::msgs::DecodeError>> for CResult_SpliceAckDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::SpliceAck, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxSignatures, crate::lightning::ln::msgs::DecodeError>> for CResult_TxSignaturesDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxSignatures, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_SpliceAckDecodeErrorZPtr { result }
+ CResult_TxSignaturesDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_SpliceAckDecodeErrorZPtr { err }
+ CResult_TxSignaturesDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_SpliceAckDecodeErrorZ {
+impl Clone for CResult_TxSignaturesDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_SpliceAckDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SpliceAck>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxSignaturesDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxSignatures>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_SpliceAckDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_TxSignaturesDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_SpliceAckDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxSignaturesDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_SpliceAckDecodeErrorZ_clone(orig: &CResult_SpliceAckDecodeErrorZ) -> CResult_SpliceAckDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_clone(orig: &CResult_TxSignaturesDecodeErrorZ) -> CResult_TxSignaturesDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_SpliceLockedDecodeErrorZ
-pub union CResult_SpliceLockedDecodeErrorZPtr {
+/// The contents of CResult_TxInitRbfDecodeErrorZ
+pub union CResult_TxInitRbfDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::SpliceLocked,
+ pub result: *mut crate::lightning::ln::msgs::TxInitRbf,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_SpliceLockedDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::SpliceLocked on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_TxInitRbfDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxInitRbf on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_SpliceLockedDecodeErrorZ {
- /// The contents of this CResult_SpliceLockedDecodeErrorZ, accessible via either
+pub struct CResult_TxInitRbfDecodeErrorZ {
+ /// The contents of this CResult_TxInitRbfDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_SpliceLockedDecodeErrorZPtr,
- /// Whether this CResult_SpliceLockedDecodeErrorZ represents a success state.
+ pub contents: CResult_TxInitRbfDecodeErrorZPtr,
+ /// Whether this CResult_TxInitRbfDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_SpliceLockedDecodeErrorZ in the success state.
-pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::SpliceLocked) -> CResult_SpliceLockedDecodeErrorZ {
- CResult_SpliceLockedDecodeErrorZ {
- contents: CResult_SpliceLockedDecodeErrorZPtr {
+/// Creates a new CResult_TxInitRbfDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxInitRbf) -> CResult_TxInitRbfDecodeErrorZ {
+ CResult_TxInitRbfDecodeErrorZ {
+ contents: CResult_TxInitRbfDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_SpliceLockedDecodeErrorZ in the error state.
-pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_SpliceLockedDecodeErrorZ {
- CResult_SpliceLockedDecodeErrorZ {
- contents: CResult_SpliceLockedDecodeErrorZPtr {
+/// Creates a new CResult_TxInitRbfDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxInitRbfDecodeErrorZ {
+ CResult_TxInitRbfDecodeErrorZ {
+ contents: CResult_TxInitRbfDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_is_ok(o: &CResult_SpliceLockedDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_is_ok(o: &CResult_TxInitRbfDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_SpliceLockedDecodeErrorZ.
-pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_free(_res: CResult_SpliceLockedDecodeErrorZ) { }
-impl Drop for CResult_SpliceLockedDecodeErrorZ {
+/// Frees any resources used by the CResult_TxInitRbfDecodeErrorZ.
+pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_free(_res: CResult_TxInitRbfDecodeErrorZ) { }
+impl Drop for CResult_TxInitRbfDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::SpliceLocked, crate::lightning::ln::msgs::DecodeError>> for CResult_SpliceLockedDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::SpliceLocked, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxInitRbf, crate::lightning::ln::msgs::DecodeError>> for CResult_TxInitRbfDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxInitRbf, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_SpliceLockedDecodeErrorZPtr { result }
+ CResult_TxInitRbfDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_SpliceLockedDecodeErrorZPtr { err }
+ CResult_TxInitRbfDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_SpliceLockedDecodeErrorZ {
+impl Clone for CResult_TxInitRbfDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_SpliceLockedDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::SpliceLocked>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxInitRbfDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxInitRbf>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_SpliceLockedDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_TxInitRbfDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_SpliceLockedDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxInitRbfDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_SpliceLockedDecodeErrorZ_clone(orig: &CResult_SpliceLockedDecodeErrorZ) -> CResult_SpliceLockedDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_clone(orig: &CResult_TxInitRbfDecodeErrorZ) -> CResult_TxInitRbfDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxAddInputDecodeErrorZ
-pub union CResult_TxAddInputDecodeErrorZPtr {
+/// The contents of CResult_TxAckRbfDecodeErrorZ
+pub union CResult_TxAckRbfDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxAddInput,
+ pub result: *mut crate::lightning::ln::msgs::TxAckRbf,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxAddInputDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxAddInput on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_TxAckRbfDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxAckRbf on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxAddInputDecodeErrorZ {
- /// The contents of this CResult_TxAddInputDecodeErrorZ, accessible via either
+pub struct CResult_TxAckRbfDecodeErrorZ {
+ /// The contents of this CResult_TxAckRbfDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxAddInputDecodeErrorZPtr,
- /// Whether this CResult_TxAddInputDecodeErrorZ represents a success state.
+ pub contents: CResult_TxAckRbfDecodeErrorZPtr,
+ /// Whether this CResult_TxAckRbfDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxAddInputDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxAddInputDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxAddInput) -> CResult_TxAddInputDecodeErrorZ {
- CResult_TxAddInputDecodeErrorZ {
- contents: CResult_TxAddInputDecodeErrorZPtr {
+/// Creates a new CResult_TxAckRbfDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxAckRbf) -> CResult_TxAckRbfDecodeErrorZ {
+ CResult_TxAckRbfDecodeErrorZ {
+ contents: CResult_TxAckRbfDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxAddInputDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxAddInputDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxAddInputDecodeErrorZ {
- CResult_TxAddInputDecodeErrorZ {
- contents: CResult_TxAddInputDecodeErrorZPtr {
+/// Creates a new CResult_TxAckRbfDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxAckRbfDecodeErrorZ {
+ CResult_TxAckRbfDecodeErrorZ {
+ contents: CResult_TxAckRbfDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxAddInputDecodeErrorZ_is_ok(o: &CResult_TxAddInputDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_is_ok(o: &CResult_TxAckRbfDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxAddInputDecodeErrorZ.
-pub extern "C" fn CResult_TxAddInputDecodeErrorZ_free(_res: CResult_TxAddInputDecodeErrorZ) { }
-impl Drop for CResult_TxAddInputDecodeErrorZ {
+/// Frees any resources used by the CResult_TxAckRbfDecodeErrorZ.
+pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_free(_res: CResult_TxAckRbfDecodeErrorZ) { }
+impl Drop for CResult_TxAckRbfDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAddInput, crate::lightning::ln::msgs::DecodeError>> for CResult_TxAddInputDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAddInput, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAckRbf, crate::lightning::ln::msgs::DecodeError>> for CResult_TxAckRbfDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAckRbf, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxAddInputDecodeErrorZPtr { result }
+ CResult_TxAckRbfDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxAddInputDecodeErrorZPtr { err }
+ CResult_TxAckRbfDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxAddInputDecodeErrorZ {
+impl Clone for CResult_TxAckRbfDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxAddInputDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxAddInput>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxAckRbfDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxAckRbf>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxAddInputDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_TxAckRbfDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxAddInputDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxAckRbfDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxAddInputDecodeErrorZ_clone(orig: &CResult_TxAddInputDecodeErrorZ) -> CResult_TxAddInputDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_clone(orig: &CResult_TxAckRbfDecodeErrorZ) -> CResult_TxAckRbfDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxAddOutputDecodeErrorZ
-pub union CResult_TxAddOutputDecodeErrorZPtr {
+/// The contents of CResult_TxAbortDecodeErrorZ
+pub union CResult_TxAbortDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxAddOutput,
+ pub result: *mut crate::lightning::ln::msgs::TxAbort,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxAddOutputDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxAddOutput on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_TxAbortDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::TxAbort on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxAddOutputDecodeErrorZ {
- /// The contents of this CResult_TxAddOutputDecodeErrorZ, accessible via either
+pub struct CResult_TxAbortDecodeErrorZ {
+ /// The contents of this CResult_TxAbortDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxAddOutputDecodeErrorZPtr,
- /// Whether this CResult_TxAddOutputDecodeErrorZ represents a success state.
+ pub contents: CResult_TxAbortDecodeErrorZPtr,
+ /// Whether this CResult_TxAbortDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxAddOutputDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxAddOutput) -> CResult_TxAddOutputDecodeErrorZ {
- CResult_TxAddOutputDecodeErrorZ {
- contents: CResult_TxAddOutputDecodeErrorZPtr {
+/// Creates a new CResult_TxAbortDecodeErrorZ in the success state.
+pub extern "C" fn CResult_TxAbortDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxAbort) -> CResult_TxAbortDecodeErrorZ {
+ CResult_TxAbortDecodeErrorZ {
+ contents: CResult_TxAbortDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxAddOutputDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxAddOutputDecodeErrorZ {
- CResult_TxAddOutputDecodeErrorZ {
- contents: CResult_TxAddOutputDecodeErrorZPtr {
+/// Creates a new CResult_TxAbortDecodeErrorZ in the error state.
+pub extern "C" fn CResult_TxAbortDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxAbortDecodeErrorZ {
+ CResult_TxAbortDecodeErrorZ {
+ contents: CResult_TxAbortDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_is_ok(o: &CResult_TxAddOutputDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_TxAbortDecodeErrorZ_is_ok(o: &CResult_TxAbortDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxAddOutputDecodeErrorZ.
-pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_free(_res: CResult_TxAddOutputDecodeErrorZ) { }
-impl Drop for CResult_TxAddOutputDecodeErrorZ {
+/// Frees any resources used by the CResult_TxAbortDecodeErrorZ.
+pub extern "C" fn CResult_TxAbortDecodeErrorZ_free(_res: CResult_TxAbortDecodeErrorZ) { }
+impl Drop for CResult_TxAbortDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAddOutput, crate::lightning::ln::msgs::DecodeError>> for CResult_TxAddOutputDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAddOutput, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAbort, crate::lightning::ln::msgs::DecodeError>> for CResult_TxAbortDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAbort, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxAddOutputDecodeErrorZPtr { result }
+ CResult_TxAbortDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxAddOutputDecodeErrorZPtr { err }
+ CResult_TxAbortDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxAddOutputDecodeErrorZ {
+impl Clone for CResult_TxAbortDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxAddOutputDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxAddOutput>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_TxAbortDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxAbort>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxAddOutputDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_TxAbortDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxAddOutputDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_TxAbortDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxAddOutputDecodeErrorZ_clone(orig: &CResult_TxAddOutputDecodeErrorZ) -> CResult_TxAddOutputDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_TxAbortDecodeErrorZ_clone(orig: &CResult_TxAbortDecodeErrorZ) -> CResult_TxAbortDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxRemoveInputDecodeErrorZ
-pub union CResult_TxRemoveInputDecodeErrorZPtr {
+/// The contents of CResult_AnnouncementSignaturesDecodeErrorZ
+pub union CResult_AnnouncementSignaturesDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxRemoveInput,
+ pub result: *mut crate::lightning::ln::msgs::AnnouncementSignatures,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxRemoveInputDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxRemoveInput on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_AnnouncementSignaturesDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::AnnouncementSignatures on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxRemoveInputDecodeErrorZ {
- /// The contents of this CResult_TxRemoveInputDecodeErrorZ, accessible via either
+pub struct CResult_AnnouncementSignaturesDecodeErrorZ {
+ /// The contents of this CResult_AnnouncementSignaturesDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxRemoveInputDecodeErrorZPtr,
- /// Whether this CResult_TxRemoveInputDecodeErrorZ represents a success state.
+ pub contents: CResult_AnnouncementSignaturesDecodeErrorZPtr,
+ /// Whether this CResult_AnnouncementSignaturesDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxRemoveInputDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxRemoveInput) -> CResult_TxRemoveInputDecodeErrorZ {
- CResult_TxRemoveInputDecodeErrorZ {
- contents: CResult_TxRemoveInputDecodeErrorZPtr {
+/// Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state.
+pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: crate::lightning::ln::msgs::AnnouncementSignatures) -> CResult_AnnouncementSignaturesDecodeErrorZ {
+ CResult_AnnouncementSignaturesDecodeErrorZ {
+ contents: CResult_AnnouncementSignaturesDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxRemoveInputDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxRemoveInputDecodeErrorZ {
- CResult_TxRemoveInputDecodeErrorZ {
- contents: CResult_TxRemoveInputDecodeErrorZPtr {
+/// Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state.
+pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_AnnouncementSignaturesDecodeErrorZ {
+ CResult_AnnouncementSignaturesDecodeErrorZ {
+ contents: CResult_AnnouncementSignaturesDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_is_ok(o: &CResult_TxRemoveInputDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o: &CResult_AnnouncementSignaturesDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxRemoveInputDecodeErrorZ.
-pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_free(_res: CResult_TxRemoveInputDecodeErrorZ) { }
-impl Drop for CResult_TxRemoveInputDecodeErrorZ {
+/// Frees any resources used by the CResult_AnnouncementSignaturesDecodeErrorZ.
+pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: CResult_AnnouncementSignaturesDecodeErrorZ) { }
+impl Drop for CResult_AnnouncementSignaturesDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxRemoveInput, crate::lightning::ln::msgs::DecodeError>> for CResult_TxRemoveInputDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxRemoveInput, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::AnnouncementSignatures, crate::lightning::ln::msgs::DecodeError>> for CResult_AnnouncementSignaturesDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::AnnouncementSignatures, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxRemoveInputDecodeErrorZPtr { result }
+ CResult_AnnouncementSignaturesDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxRemoveInputDecodeErrorZPtr { err }
+ CResult_AnnouncementSignaturesDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxRemoveInputDecodeErrorZ {
+impl Clone for CResult_AnnouncementSignaturesDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxRemoveInputDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxRemoveInput>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_AnnouncementSignaturesDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::AnnouncementSignatures>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxRemoveInputDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_AnnouncementSignaturesDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxRemoveInputDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_AnnouncementSignaturesDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxRemoveInputDecodeErrorZ_clone(orig: &CResult_TxRemoveInputDecodeErrorZ) -> CResult_TxRemoveInputDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: &CResult_AnnouncementSignaturesDecodeErrorZ) -> CResult_AnnouncementSignaturesDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxRemoveOutputDecodeErrorZ
-pub union CResult_TxRemoveOutputDecodeErrorZPtr {
+/// The contents of CResult_ChannelReestablishDecodeErrorZ
+pub union CResult_ChannelReestablishDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxRemoveOutput,
+ pub result: *mut crate::lightning::ln::msgs::ChannelReestablish,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxRemoveOutputDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxRemoveOutput on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ChannelReestablishDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ChannelReestablish on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxRemoveOutputDecodeErrorZ {
- /// The contents of this CResult_TxRemoveOutputDecodeErrorZ, accessible via either
+pub struct CResult_ChannelReestablishDecodeErrorZ {
+ /// The contents of this CResult_ChannelReestablishDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxRemoveOutputDecodeErrorZPtr,
- /// Whether this CResult_TxRemoveOutputDecodeErrorZ represents a success state.
+ pub contents: CResult_ChannelReestablishDecodeErrorZPtr,
+ /// Whether this CResult_ChannelReestablishDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxRemoveOutputDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxRemoveOutput) -> CResult_TxRemoveOutputDecodeErrorZ {
- CResult_TxRemoveOutputDecodeErrorZ {
- contents: CResult_TxRemoveOutputDecodeErrorZPtr {
+/// Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ChannelReestablish) -> CResult_ChannelReestablishDecodeErrorZ {
+ CResult_ChannelReestablishDecodeErrorZ {
+ contents: CResult_ChannelReestablishDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxRemoveOutputDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxRemoveOutputDecodeErrorZ {
- CResult_TxRemoveOutputDecodeErrorZ {
- contents: CResult_TxRemoveOutputDecodeErrorZPtr {
+/// Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelReestablishDecodeErrorZ {
+ CResult_ChannelReestablishDecodeErrorZ {
+ contents: CResult_ChannelReestablishDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_is_ok(o: &CResult_TxRemoveOutputDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_is_ok(o: &CResult_ChannelReestablishDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxRemoveOutputDecodeErrorZ.
-pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_free(_res: CResult_TxRemoveOutputDecodeErrorZ) { }
-impl Drop for CResult_TxRemoveOutputDecodeErrorZ {
+/// Frees any resources used by the CResult_ChannelReestablishDecodeErrorZ.
+pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_free(_res: CResult_ChannelReestablishDecodeErrorZ) { }
+impl Drop for CResult_ChannelReestablishDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxRemoveOutput, crate::lightning::ln::msgs::DecodeError>> for CResult_TxRemoveOutputDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxRemoveOutput, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelReestablish, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelReestablishDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelReestablish, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxRemoveOutputDecodeErrorZPtr { result }
+ CResult_ChannelReestablishDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxRemoveOutputDecodeErrorZPtr { err }
+ CResult_ChannelReestablishDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxRemoveOutputDecodeErrorZ {
+impl Clone for CResult_ChannelReestablishDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxRemoveOutputDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxRemoveOutput>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ChannelReestablishDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ChannelReestablish>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxRemoveOutputDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ChannelReestablishDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxRemoveOutputDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ChannelReestablishDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxRemoveOutputDecodeErrorZ_clone(orig: &CResult_TxRemoveOutputDecodeErrorZ) -> CResult_TxRemoveOutputDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_clone(orig: &CResult_ChannelReestablishDecodeErrorZ) -> CResult_ChannelReestablishDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxCompleteDecodeErrorZ
-pub union CResult_TxCompleteDecodeErrorZPtr {
+/// The contents of CResult_ClosingSignedDecodeErrorZ
+pub union CResult_ClosingSignedDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxComplete,
+ pub result: *mut crate::lightning::ln::msgs::ClosingSigned,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxCompleteDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxComplete on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ClosingSignedDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ClosingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxCompleteDecodeErrorZ {
- /// The contents of this CResult_TxCompleteDecodeErrorZ, accessible via either
+pub struct CResult_ClosingSignedDecodeErrorZ {
+ /// The contents of this CResult_ClosingSignedDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxCompleteDecodeErrorZPtr,
- /// Whether this CResult_TxCompleteDecodeErrorZ represents a success state.
+ pub contents: CResult_ClosingSignedDecodeErrorZPtr,
+ /// Whether this CResult_ClosingSignedDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxCompleteDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxCompleteDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxComplete) -> CResult_TxCompleteDecodeErrorZ {
- CResult_TxCompleteDecodeErrorZ {
- contents: CResult_TxCompleteDecodeErrorZPtr {
+/// Creates a new CResult_ClosingSignedDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ClosingSigned) -> CResult_ClosingSignedDecodeErrorZ {
+ CResult_ClosingSignedDecodeErrorZ {
+ contents: CResult_ClosingSignedDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxCompleteDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxCompleteDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxCompleteDecodeErrorZ {
- CResult_TxCompleteDecodeErrorZ {
- contents: CResult_TxCompleteDecodeErrorZPtr {
+/// Creates a new CResult_ClosingSignedDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ClosingSignedDecodeErrorZ {
+ CResult_ClosingSignedDecodeErrorZ {
+ contents: CResult_ClosingSignedDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxCompleteDecodeErrorZ_is_ok(o: &CResult_TxCompleteDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_is_ok(o: &CResult_ClosingSignedDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxCompleteDecodeErrorZ.
-pub extern "C" fn CResult_TxCompleteDecodeErrorZ_free(_res: CResult_TxCompleteDecodeErrorZ) { }
-impl Drop for CResult_TxCompleteDecodeErrorZ {
+/// Frees any resources used by the CResult_ClosingSignedDecodeErrorZ.
+pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_free(_res: CResult_ClosingSignedDecodeErrorZ) { }
+impl Drop for CResult_ClosingSignedDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxComplete, crate::lightning::ln::msgs::DecodeError>> for CResult_TxCompleteDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxComplete, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ClosingSigned, crate::lightning::ln::msgs::DecodeError>> for CResult_ClosingSignedDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ClosingSigned, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxCompleteDecodeErrorZPtr { result }
+ CResult_ClosingSignedDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxCompleteDecodeErrorZPtr { err }
+ CResult_ClosingSignedDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxCompleteDecodeErrorZ {
+impl Clone for CResult_ClosingSignedDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxCompleteDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxComplete>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ClosingSignedDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ClosingSigned>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxCompleteDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ClosingSignedDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxCompleteDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ClosingSignedDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxCompleteDecodeErrorZ_clone(orig: &CResult_TxCompleteDecodeErrorZ) -> CResult_TxCompleteDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_clone(orig: &CResult_ClosingSignedDecodeErrorZ) -> CResult_ClosingSignedDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxSignaturesDecodeErrorZ
-pub union CResult_TxSignaturesDecodeErrorZPtr {
+/// The contents of CResult_ClosingSignedFeeRangeDecodeErrorZ
+pub union CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxSignatures,
+ pub result: *mut crate::lightning::ln::msgs::ClosingSignedFeeRange,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxSignaturesDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxSignatures on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ClosingSignedFeeRangeDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ClosingSignedFeeRange on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxSignaturesDecodeErrorZ {
- /// The contents of this CResult_TxSignaturesDecodeErrorZ, accessible via either
+pub struct CResult_ClosingSignedFeeRangeDecodeErrorZ {
+ /// The contents of this CResult_ClosingSignedFeeRangeDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxSignaturesDecodeErrorZPtr,
- /// Whether this CResult_TxSignaturesDecodeErrorZ represents a success state.
+ pub contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr,
+ /// Whether this CResult_ClosingSignedFeeRangeDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxSignaturesDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxSignatures) -> CResult_TxSignaturesDecodeErrorZ {
- CResult_TxSignaturesDecodeErrorZ {
- contents: CResult_TxSignaturesDecodeErrorZPtr {
+/// Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ClosingSignedFeeRange) -> CResult_ClosingSignedFeeRangeDecodeErrorZ {
+ CResult_ClosingSignedFeeRangeDecodeErrorZ {
+ contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxSignaturesDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxSignaturesDecodeErrorZ {
- CResult_TxSignaturesDecodeErrorZ {
- contents: CResult_TxSignaturesDecodeErrorZPtr {
+/// Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ClosingSignedFeeRangeDecodeErrorZ {
+ CResult_ClosingSignedFeeRangeDecodeErrorZ {
+ contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_is_ok(o: &CResult_TxSignaturesDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o: &CResult_ClosingSignedFeeRangeDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxSignaturesDecodeErrorZ.
-pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_free(_res: CResult_TxSignaturesDecodeErrorZ) { }
-impl Drop for CResult_TxSignaturesDecodeErrorZ {
+/// Frees any resources used by the CResult_ClosingSignedFeeRangeDecodeErrorZ.
+pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: CResult_ClosingSignedFeeRangeDecodeErrorZ) { }
+impl Drop for CResult_ClosingSignedFeeRangeDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxSignatures, crate::lightning::ln::msgs::DecodeError>> for CResult_TxSignaturesDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxSignatures, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ClosingSignedFeeRange, crate::lightning::ln::msgs::DecodeError>> for CResult_ClosingSignedFeeRangeDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ClosingSignedFeeRange, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxSignaturesDecodeErrorZPtr { result }
+ CResult_ClosingSignedFeeRangeDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxSignaturesDecodeErrorZPtr { err }
+ CResult_ClosingSignedFeeRangeDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxSignaturesDecodeErrorZ {
+impl Clone for CResult_ClosingSignedFeeRangeDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxSignaturesDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxSignatures>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ClosingSignedFeeRange>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxSignaturesDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxSignaturesDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxSignaturesDecodeErrorZ_clone(orig: &CResult_TxSignaturesDecodeErrorZ) -> CResult_TxSignaturesDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: &CResult_ClosingSignedFeeRangeDecodeErrorZ) -> CResult_ClosingSignedFeeRangeDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxInitRbfDecodeErrorZ
-pub union CResult_TxInitRbfDecodeErrorZPtr {
+/// The contents of CResult_CommitmentSignedDecodeErrorZ
+pub union CResult_CommitmentSignedDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxInitRbf,
+ pub result: *mut crate::lightning::ln::msgs::CommitmentSigned,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxInitRbfDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxInitRbf on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_CommitmentSignedDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::CommitmentSigned on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxInitRbfDecodeErrorZ {
- /// The contents of this CResult_TxInitRbfDecodeErrorZ, accessible via either
+pub struct CResult_CommitmentSignedDecodeErrorZ {
+ /// The contents of this CResult_CommitmentSignedDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxInitRbfDecodeErrorZPtr,
- /// Whether this CResult_TxInitRbfDecodeErrorZ represents a success state.
+ pub contents: CResult_CommitmentSignedDecodeErrorZPtr,
+ /// Whether this CResult_CommitmentSignedDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxInitRbfDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxInitRbf) -> CResult_TxInitRbfDecodeErrorZ {
- CResult_TxInitRbfDecodeErrorZ {
- contents: CResult_TxInitRbfDecodeErrorZPtr {
+/// Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state.
+pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::CommitmentSigned) -> CResult_CommitmentSignedDecodeErrorZ {
+ CResult_CommitmentSignedDecodeErrorZ {
+ contents: CResult_CommitmentSignedDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxInitRbfDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxInitRbfDecodeErrorZ {
- CResult_TxInitRbfDecodeErrorZ {
- contents: CResult_TxInitRbfDecodeErrorZPtr {
+/// Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state.
+pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_CommitmentSignedDecodeErrorZ {
+ CResult_CommitmentSignedDecodeErrorZ {
+ contents: CResult_CommitmentSignedDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_is_ok(o: &CResult_TxInitRbfDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_is_ok(o: &CResult_CommitmentSignedDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxInitRbfDecodeErrorZ.
-pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_free(_res: CResult_TxInitRbfDecodeErrorZ) { }
-impl Drop for CResult_TxInitRbfDecodeErrorZ {
+/// Frees any resources used by the CResult_CommitmentSignedDecodeErrorZ.
+pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_free(_res: CResult_CommitmentSignedDecodeErrorZ) { }
+impl Drop for CResult_CommitmentSignedDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxInitRbf, crate::lightning::ln::msgs::DecodeError>> for CResult_TxInitRbfDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxInitRbf, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::CommitmentSigned, crate::lightning::ln::msgs::DecodeError>> for CResult_CommitmentSignedDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::CommitmentSigned, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxInitRbfDecodeErrorZPtr { result }
+ CResult_CommitmentSignedDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxInitRbfDecodeErrorZPtr { err }
+ CResult_CommitmentSignedDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxInitRbfDecodeErrorZ {
+impl Clone for CResult_CommitmentSignedDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxInitRbfDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxInitRbf>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_CommitmentSignedDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::CommitmentSigned>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxInitRbfDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_CommitmentSignedDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxInitRbfDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_CommitmentSignedDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxInitRbfDecodeErrorZ_clone(orig: &CResult_TxInitRbfDecodeErrorZ) -> CResult_TxInitRbfDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_clone(orig: &CResult_CommitmentSignedDecodeErrorZ) -> CResult_CommitmentSignedDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxAckRbfDecodeErrorZ
-pub union CResult_TxAckRbfDecodeErrorZPtr {
+/// The contents of CResult_FundingCreatedDecodeErrorZ
+pub union CResult_FundingCreatedDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxAckRbf,
+ pub result: *mut crate::lightning::ln::msgs::FundingCreated,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxAckRbfDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxAckRbf on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_FundingCreatedDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::FundingCreated on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxAckRbfDecodeErrorZ {
- /// The contents of this CResult_TxAckRbfDecodeErrorZ, accessible via either
+pub struct CResult_FundingCreatedDecodeErrorZ {
+ /// The contents of this CResult_FundingCreatedDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxAckRbfDecodeErrorZPtr,
- /// Whether this CResult_TxAckRbfDecodeErrorZ represents a success state.
+ pub contents: CResult_FundingCreatedDecodeErrorZPtr,
+ /// Whether this CResult_FundingCreatedDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxAckRbfDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxAckRbf) -> CResult_TxAckRbfDecodeErrorZ {
- CResult_TxAckRbfDecodeErrorZ {
- contents: CResult_TxAckRbfDecodeErrorZPtr {
+/// Creates a new CResult_FundingCreatedDecodeErrorZ in the success state.
+pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::FundingCreated) -> CResult_FundingCreatedDecodeErrorZ {
+ CResult_FundingCreatedDecodeErrorZ {
+ contents: CResult_FundingCreatedDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxAckRbfDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxAckRbfDecodeErrorZ {
- CResult_TxAckRbfDecodeErrorZ {
- contents: CResult_TxAckRbfDecodeErrorZPtr {
+/// Creates a new CResult_FundingCreatedDecodeErrorZ in the error state.
+pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_FundingCreatedDecodeErrorZ {
+ CResult_FundingCreatedDecodeErrorZ {
+ contents: CResult_FundingCreatedDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_is_ok(o: &CResult_TxAckRbfDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_is_ok(o: &CResult_FundingCreatedDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxAckRbfDecodeErrorZ.
-pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_free(_res: CResult_TxAckRbfDecodeErrorZ) { }
-impl Drop for CResult_TxAckRbfDecodeErrorZ {
+/// Frees any resources used by the CResult_FundingCreatedDecodeErrorZ.
+pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_free(_res: CResult_FundingCreatedDecodeErrorZ) { }
+impl Drop for CResult_FundingCreatedDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAckRbf, crate::lightning::ln::msgs::DecodeError>> for CResult_TxAckRbfDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAckRbf, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::FundingCreated, crate::lightning::ln::msgs::DecodeError>> for CResult_FundingCreatedDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::FundingCreated, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxAckRbfDecodeErrorZPtr { result }
+ CResult_FundingCreatedDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxAckRbfDecodeErrorZPtr { err }
+ CResult_FundingCreatedDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxAckRbfDecodeErrorZ {
+impl Clone for CResult_FundingCreatedDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxAckRbfDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxAckRbf>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_FundingCreatedDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::FundingCreated>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxAckRbfDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_FundingCreatedDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxAckRbfDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_FundingCreatedDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxAckRbfDecodeErrorZ_clone(orig: &CResult_TxAckRbfDecodeErrorZ) -> CResult_TxAckRbfDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_clone(orig: &CResult_FundingCreatedDecodeErrorZ) -> CResult_FundingCreatedDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_TxAbortDecodeErrorZ
-pub union CResult_TxAbortDecodeErrorZPtr {
+/// The contents of CResult_FundingSignedDecodeErrorZ
+pub union CResult_FundingSignedDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::TxAbort,
+ pub result: *mut crate::lightning::ln::msgs::FundingSigned,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_TxAbortDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::TxAbort on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_FundingSignedDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::FundingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_TxAbortDecodeErrorZ {
- /// The contents of this CResult_TxAbortDecodeErrorZ, accessible via either
+pub struct CResult_FundingSignedDecodeErrorZ {
+ /// The contents of this CResult_FundingSignedDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_TxAbortDecodeErrorZPtr,
- /// Whether this CResult_TxAbortDecodeErrorZ represents a success state.
+ pub contents: CResult_FundingSignedDecodeErrorZPtr,
+ /// Whether this CResult_FundingSignedDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_TxAbortDecodeErrorZ in the success state.
-pub extern "C" fn CResult_TxAbortDecodeErrorZ_ok(o: crate::lightning::ln::msgs::TxAbort) -> CResult_TxAbortDecodeErrorZ {
- CResult_TxAbortDecodeErrorZ {
- contents: CResult_TxAbortDecodeErrorZPtr {
+/// Creates a new CResult_FundingSignedDecodeErrorZ in the success state.
+pub extern "C" fn CResult_FundingSignedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::FundingSigned) -> CResult_FundingSignedDecodeErrorZ {
+ CResult_FundingSignedDecodeErrorZ {
+ contents: CResult_FundingSignedDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_TxAbortDecodeErrorZ in the error state.
-pub extern "C" fn CResult_TxAbortDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_TxAbortDecodeErrorZ {
- CResult_TxAbortDecodeErrorZ {
- contents: CResult_TxAbortDecodeErrorZPtr {
+/// Creates a new CResult_FundingSignedDecodeErrorZ in the error state.
+pub extern "C" fn CResult_FundingSignedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_FundingSignedDecodeErrorZ {
+ CResult_FundingSignedDecodeErrorZ {
+ contents: CResult_FundingSignedDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_TxAbortDecodeErrorZ_is_ok(o: &CResult_TxAbortDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_FundingSignedDecodeErrorZ_is_ok(o: &CResult_FundingSignedDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_TxAbortDecodeErrorZ.
-pub extern "C" fn CResult_TxAbortDecodeErrorZ_free(_res: CResult_TxAbortDecodeErrorZ) { }
-impl Drop for CResult_TxAbortDecodeErrorZ {
+/// Frees any resources used by the CResult_FundingSignedDecodeErrorZ.
+pub extern "C" fn CResult_FundingSignedDecodeErrorZ_free(_res: CResult_FundingSignedDecodeErrorZ) { }
+impl Drop for CResult_FundingSignedDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAbort, crate::lightning::ln::msgs::DecodeError>> for CResult_TxAbortDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::TxAbort, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::FundingSigned, crate::lightning::ln::msgs::DecodeError>> for CResult_FundingSignedDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::FundingSigned, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_TxAbortDecodeErrorZPtr { result }
+ CResult_FundingSignedDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_TxAbortDecodeErrorZPtr { err }
+ CResult_FundingSignedDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_TxAbortDecodeErrorZ {
+impl Clone for CResult_FundingSignedDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_TxAbortDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::TxAbort>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_FundingSignedDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::FundingSigned>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_TxAbortDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_FundingSignedDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_TxAbortDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_FundingSignedDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_TxAbortDecodeErrorZ_clone(orig: &CResult_TxAbortDecodeErrorZ) -> CResult_TxAbortDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_FundingSignedDecodeErrorZ_clone(orig: &CResult_FundingSignedDecodeErrorZ) -> CResult_FundingSignedDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_AnnouncementSignaturesDecodeErrorZ
-pub union CResult_AnnouncementSignaturesDecodeErrorZPtr {
+/// The contents of CResult_ChannelReadyDecodeErrorZ
+pub union CResult_ChannelReadyDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::AnnouncementSignatures,
+ pub result: *mut crate::lightning::ln::msgs::ChannelReady,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_AnnouncementSignaturesDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::AnnouncementSignatures on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ChannelReadyDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ChannelReady on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_AnnouncementSignaturesDecodeErrorZ {
- /// The contents of this CResult_AnnouncementSignaturesDecodeErrorZ, accessible via either
+pub struct CResult_ChannelReadyDecodeErrorZ {
+ /// The contents of this CResult_ChannelReadyDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_AnnouncementSignaturesDecodeErrorZPtr,
- /// Whether this CResult_AnnouncementSignaturesDecodeErrorZ represents a success state.
+ pub contents: CResult_ChannelReadyDecodeErrorZPtr,
+ /// Whether this CResult_ChannelReadyDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state.
-pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: crate::lightning::ln::msgs::AnnouncementSignatures) -> CResult_AnnouncementSignaturesDecodeErrorZ {
- CResult_AnnouncementSignaturesDecodeErrorZ {
- contents: CResult_AnnouncementSignaturesDecodeErrorZPtr {
+/// Creates a new CResult_ChannelReadyDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ChannelReady) -> CResult_ChannelReadyDecodeErrorZ {
+ CResult_ChannelReadyDecodeErrorZ {
+ contents: CResult_ChannelReadyDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state.
-pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_AnnouncementSignaturesDecodeErrorZ {
- CResult_AnnouncementSignaturesDecodeErrorZ {
- contents: CResult_AnnouncementSignaturesDecodeErrorZPtr {
+/// Creates a new CResult_ChannelReadyDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelReadyDecodeErrorZ {
+ CResult_ChannelReadyDecodeErrorZ {
+ contents: CResult_ChannelReadyDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(o: &CResult_AnnouncementSignaturesDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_is_ok(o: &CResult_ChannelReadyDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_AnnouncementSignaturesDecodeErrorZ.
-pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: CResult_AnnouncementSignaturesDecodeErrorZ) { }
-impl Drop for CResult_AnnouncementSignaturesDecodeErrorZ {
+/// Frees any resources used by the CResult_ChannelReadyDecodeErrorZ.
+pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_free(_res: CResult_ChannelReadyDecodeErrorZ) { }
+impl Drop for CResult_ChannelReadyDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::AnnouncementSignatures, crate::lightning::ln::msgs::DecodeError>> for CResult_AnnouncementSignaturesDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::AnnouncementSignatures, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelReady, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelReadyDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelReady, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_AnnouncementSignaturesDecodeErrorZPtr { result }
+ CResult_ChannelReadyDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_AnnouncementSignaturesDecodeErrorZPtr { err }
+ CResult_ChannelReadyDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_AnnouncementSignaturesDecodeErrorZ {
+impl Clone for CResult_ChannelReadyDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_AnnouncementSignaturesDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::AnnouncementSignatures>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ChannelReadyDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ChannelReady>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_AnnouncementSignaturesDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ChannelReadyDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_AnnouncementSignaturesDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ChannelReadyDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: &CResult_AnnouncementSignaturesDecodeErrorZ) -> CResult_AnnouncementSignaturesDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_clone(orig: &CResult_ChannelReadyDecodeErrorZ) -> CResult_ChannelReadyDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelReestablishDecodeErrorZ
-pub union CResult_ChannelReestablishDecodeErrorZPtr {
+/// The contents of CResult_InitDecodeErrorZ
+pub union CResult_InitDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ChannelReestablish,
+ pub result: *mut crate::lightning::ln::msgs::Init,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ChannelReestablishDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ChannelReestablish on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_InitDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::Init on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelReestablishDecodeErrorZ {
- /// The contents of this CResult_ChannelReestablishDecodeErrorZ, accessible via either
+pub struct CResult_InitDecodeErrorZ {
+ /// The contents of this CResult_InitDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelReestablishDecodeErrorZPtr,
- /// Whether this CResult_ChannelReestablishDecodeErrorZ represents a success state.
+ pub contents: CResult_InitDecodeErrorZPtr,
+ /// Whether this CResult_InitDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ChannelReestablish) -> CResult_ChannelReestablishDecodeErrorZ {
- CResult_ChannelReestablishDecodeErrorZ {
- contents: CResult_ChannelReestablishDecodeErrorZPtr {
+/// Creates a new CResult_InitDecodeErrorZ in the success state.
+pub extern "C" fn CResult_InitDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Init) -> CResult_InitDecodeErrorZ {
+ CResult_InitDecodeErrorZ {
+ contents: CResult_InitDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelReestablishDecodeErrorZ {
- CResult_ChannelReestablishDecodeErrorZ {
- contents: CResult_ChannelReestablishDecodeErrorZPtr {
+/// Creates a new CResult_InitDecodeErrorZ in the error state.
+pub extern "C" fn CResult_InitDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_InitDecodeErrorZ {
+ CResult_InitDecodeErrorZ {
+ contents: CResult_InitDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_is_ok(o: &CResult_ChannelReestablishDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_InitDecodeErrorZ_is_ok(o: &CResult_InitDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelReestablishDecodeErrorZ.
-pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_free(_res: CResult_ChannelReestablishDecodeErrorZ) { }
-impl Drop for CResult_ChannelReestablishDecodeErrorZ {
+/// Frees any resources used by the CResult_InitDecodeErrorZ.
+pub extern "C" fn CResult_InitDecodeErrorZ_free(_res: CResult_InitDecodeErrorZ) { }
+impl Drop for CResult_InitDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelReestablish, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelReestablishDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelReestablish, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Init, crate::lightning::ln::msgs::DecodeError>> for CResult_InitDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Init, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelReestablishDecodeErrorZPtr { result }
+ CResult_InitDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelReestablishDecodeErrorZPtr { err }
+ CResult_InitDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChannelReestablishDecodeErrorZ {
+impl Clone for CResult_InitDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelReestablishDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ChannelReestablish>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_InitDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Init>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChannelReestablishDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_InitDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelReestablishDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_InitDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelReestablishDecodeErrorZ_clone(orig: &CResult_ChannelReestablishDecodeErrorZ) -> CResult_ChannelReestablishDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_InitDecodeErrorZ_clone(orig: &CResult_InitDecodeErrorZ) -> CResult_InitDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ClosingSignedDecodeErrorZ
-pub union CResult_ClosingSignedDecodeErrorZPtr {
+/// The contents of CResult_OpenChannelDecodeErrorZ
+pub union CResult_OpenChannelDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ClosingSigned,
+ pub result: *mut crate::lightning::ln::msgs::OpenChannel,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ClosingSignedDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ClosingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_OpenChannelDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::OpenChannel on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ClosingSignedDecodeErrorZ {
- /// The contents of this CResult_ClosingSignedDecodeErrorZ, accessible via either
+pub struct CResult_OpenChannelDecodeErrorZ {
+ /// The contents of this CResult_OpenChannelDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ClosingSignedDecodeErrorZPtr,
- /// Whether this CResult_ClosingSignedDecodeErrorZ represents a success state.
+ pub contents: CResult_OpenChannelDecodeErrorZPtr,
+ /// Whether this CResult_OpenChannelDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ClosingSignedDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ClosingSigned) -> CResult_ClosingSignedDecodeErrorZ {
- CResult_ClosingSignedDecodeErrorZ {
- contents: CResult_ClosingSignedDecodeErrorZPtr {
+/// Creates a new CResult_OpenChannelDecodeErrorZ in the success state.
+pub extern "C" fn CResult_OpenChannelDecodeErrorZ_ok(o: crate::lightning::ln::msgs::OpenChannel) -> CResult_OpenChannelDecodeErrorZ {
+ CResult_OpenChannelDecodeErrorZ {
+ contents: CResult_OpenChannelDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ClosingSignedDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ClosingSignedDecodeErrorZ {
- CResult_ClosingSignedDecodeErrorZ {
- contents: CResult_ClosingSignedDecodeErrorZPtr {
+/// Creates a new CResult_OpenChannelDecodeErrorZ in the error state.
+pub extern "C" fn CResult_OpenChannelDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OpenChannelDecodeErrorZ {
+ CResult_OpenChannelDecodeErrorZ {
+ contents: CResult_OpenChannelDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_is_ok(o: &CResult_ClosingSignedDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_OpenChannelDecodeErrorZ_is_ok(o: &CResult_OpenChannelDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ClosingSignedDecodeErrorZ.
-pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_free(_res: CResult_ClosingSignedDecodeErrorZ) { }
-impl Drop for CResult_ClosingSignedDecodeErrorZ {
+/// Frees any resources used by the CResult_OpenChannelDecodeErrorZ.
+pub extern "C" fn CResult_OpenChannelDecodeErrorZ_free(_res: CResult_OpenChannelDecodeErrorZ) { }
+impl Drop for CResult_OpenChannelDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ClosingSigned, crate::lightning::ln::msgs::DecodeError>> for CResult_ClosingSignedDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ClosingSigned, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::OpenChannel, crate::lightning::ln::msgs::DecodeError>> for CResult_OpenChannelDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::OpenChannel, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ClosingSignedDecodeErrorZPtr { result }
+ CResult_OpenChannelDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ClosingSignedDecodeErrorZPtr { err }
+ CResult_OpenChannelDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ClosingSignedDecodeErrorZ {
+impl Clone for CResult_OpenChannelDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ClosingSignedDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ClosingSigned>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_OpenChannelDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::OpenChannel>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ClosingSignedDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_OpenChannelDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ClosingSignedDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_OpenChannelDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ClosingSignedDecodeErrorZ_clone(orig: &CResult_ClosingSignedDecodeErrorZ) -> CResult_ClosingSignedDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_OpenChannelDecodeErrorZ_clone(orig: &CResult_OpenChannelDecodeErrorZ) -> CResult_OpenChannelDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ClosingSignedFeeRangeDecodeErrorZ
-pub union CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
+/// The contents of CResult_OpenChannelV2DecodeErrorZ
+pub union CResult_OpenChannelV2DecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ClosingSignedFeeRange,
+ pub result: *mut crate::lightning::ln::msgs::OpenChannelV2,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ClosingSignedFeeRangeDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ClosingSignedFeeRange on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_OpenChannelV2DecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::OpenChannelV2 on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ClosingSignedFeeRangeDecodeErrorZ {
- /// The contents of this CResult_ClosingSignedFeeRangeDecodeErrorZ, accessible via either
+pub struct CResult_OpenChannelV2DecodeErrorZ {
+ /// The contents of this CResult_OpenChannelV2DecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr,
- /// Whether this CResult_ClosingSignedFeeRangeDecodeErrorZ represents a success state.
+ pub contents: CResult_OpenChannelV2DecodeErrorZPtr,
+ /// Whether this CResult_OpenChannelV2DecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ClosingSignedFeeRange) -> CResult_ClosingSignedFeeRangeDecodeErrorZ {
- CResult_ClosingSignedFeeRangeDecodeErrorZ {
- contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
+/// Creates a new CResult_OpenChannelV2DecodeErrorZ in the success state.
+pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_ok(o: crate::lightning::ln::msgs::OpenChannelV2) -> CResult_OpenChannelV2DecodeErrorZ {
+ CResult_OpenChannelV2DecodeErrorZ {
+ contents: CResult_OpenChannelV2DecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ClosingSignedFeeRangeDecodeErrorZ {
- CResult_ClosingSignedFeeRangeDecodeErrorZ {
- contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
+/// Creates a new CResult_OpenChannelV2DecodeErrorZ in the error state.
+pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OpenChannelV2DecodeErrorZ {
+ CResult_OpenChannelV2DecodeErrorZ {
+ contents: CResult_OpenChannelV2DecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(o: &CResult_ClosingSignedFeeRangeDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_is_ok(o: &CResult_OpenChannelV2DecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ClosingSignedFeeRangeDecodeErrorZ.
-pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: CResult_ClosingSignedFeeRangeDecodeErrorZ) { }
-impl Drop for CResult_ClosingSignedFeeRangeDecodeErrorZ {
+/// Frees any resources used by the CResult_OpenChannelV2DecodeErrorZ.
+pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_free(_res: CResult_OpenChannelV2DecodeErrorZ) { }
+impl Drop for CResult_OpenChannelV2DecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ClosingSignedFeeRange, crate::lightning::ln::msgs::DecodeError>> for CResult_ClosingSignedFeeRangeDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ClosingSignedFeeRange, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::OpenChannelV2, crate::lightning::ln::msgs::DecodeError>> for CResult_OpenChannelV2DecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::OpenChannelV2, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ClosingSignedFeeRangeDecodeErrorZPtr { result }
+ CResult_OpenChannelV2DecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ClosingSignedFeeRangeDecodeErrorZPtr { err }
+ CResult_OpenChannelV2DecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ClosingSignedFeeRangeDecodeErrorZ {
+impl Clone for CResult_OpenChannelV2DecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ClosingSignedFeeRange>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_OpenChannelV2DecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::OpenChannelV2>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ClosingSignedFeeRangeDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_OpenChannelV2DecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ClosingSignedFeeRangeDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_OpenChannelV2DecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: &CResult_ClosingSignedFeeRangeDecodeErrorZ) -> CResult_ClosingSignedFeeRangeDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_clone(orig: &CResult_OpenChannelV2DecodeErrorZ) -> CResult_OpenChannelV2DecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_CommitmentSignedDecodeErrorZ
-pub union CResult_CommitmentSignedDecodeErrorZPtr {
+/// The contents of CResult_RevokeAndACKDecodeErrorZ
+pub union CResult_RevokeAndACKDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::CommitmentSigned,
+ pub result: *mut crate::lightning::ln::msgs::RevokeAndACK,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_CommitmentSignedDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::CommitmentSigned on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_RevokeAndACKDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::RevokeAndACK on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_CommitmentSignedDecodeErrorZ {
- /// The contents of this CResult_CommitmentSignedDecodeErrorZ, accessible via either
+pub struct CResult_RevokeAndACKDecodeErrorZ {
+ /// The contents of this CResult_RevokeAndACKDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_CommitmentSignedDecodeErrorZPtr,
- /// Whether this CResult_CommitmentSignedDecodeErrorZ represents a success state.
+ pub contents: CResult_RevokeAndACKDecodeErrorZPtr,
+ /// Whether this CResult_RevokeAndACKDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state.
-pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::CommitmentSigned) -> CResult_CommitmentSignedDecodeErrorZ {
- CResult_CommitmentSignedDecodeErrorZ {
- contents: CResult_CommitmentSignedDecodeErrorZPtr {
+/// Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state.
+pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_ok(o: crate::lightning::ln::msgs::RevokeAndACK) -> CResult_RevokeAndACKDecodeErrorZ {
+ CResult_RevokeAndACKDecodeErrorZ {
+ contents: CResult_RevokeAndACKDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state.
-pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_CommitmentSignedDecodeErrorZ {
- CResult_CommitmentSignedDecodeErrorZ {
- contents: CResult_CommitmentSignedDecodeErrorZPtr {
+/// Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state.
+pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_RevokeAndACKDecodeErrorZ {
+ CResult_RevokeAndACKDecodeErrorZ {
+ contents: CResult_RevokeAndACKDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_is_ok(o: &CResult_CommitmentSignedDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_is_ok(o: &CResult_RevokeAndACKDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_CommitmentSignedDecodeErrorZ.
-pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_free(_res: CResult_CommitmentSignedDecodeErrorZ) { }
-impl Drop for CResult_CommitmentSignedDecodeErrorZ {
+/// Frees any resources used by the CResult_RevokeAndACKDecodeErrorZ.
+pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_free(_res: CResult_RevokeAndACKDecodeErrorZ) { }
+impl Drop for CResult_RevokeAndACKDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::CommitmentSigned, crate::lightning::ln::msgs::DecodeError>> for CResult_CommitmentSignedDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::CommitmentSigned, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::RevokeAndACK, crate::lightning::ln::msgs::DecodeError>> for CResult_RevokeAndACKDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::RevokeAndACK, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_CommitmentSignedDecodeErrorZPtr { result }
+ CResult_RevokeAndACKDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_CommitmentSignedDecodeErrorZPtr { err }
+ CResult_RevokeAndACKDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_CommitmentSignedDecodeErrorZ {
+impl Clone for CResult_RevokeAndACKDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_CommitmentSignedDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::CommitmentSigned>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_RevokeAndACKDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::RevokeAndACK>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_CommitmentSignedDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_RevokeAndACKDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_CommitmentSignedDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_RevokeAndACKDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_CommitmentSignedDecodeErrorZ_clone(orig: &CResult_CommitmentSignedDecodeErrorZ) -> CResult_CommitmentSignedDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_clone(orig: &CResult_RevokeAndACKDecodeErrorZ) -> CResult_RevokeAndACKDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_FundingCreatedDecodeErrorZ
-pub union CResult_FundingCreatedDecodeErrorZPtr {
+/// The contents of CResult_ShutdownDecodeErrorZ
+pub union CResult_ShutdownDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::FundingCreated,
+ pub result: *mut crate::lightning::ln::msgs::Shutdown,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_FundingCreatedDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::FundingCreated on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ShutdownDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::Shutdown on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_FundingCreatedDecodeErrorZ {
- /// The contents of this CResult_FundingCreatedDecodeErrorZ, accessible via either
+pub struct CResult_ShutdownDecodeErrorZ {
+ /// The contents of this CResult_ShutdownDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_FundingCreatedDecodeErrorZPtr,
- /// Whether this CResult_FundingCreatedDecodeErrorZ represents a success state.
+ pub contents: CResult_ShutdownDecodeErrorZPtr,
+ /// Whether this CResult_ShutdownDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_FundingCreatedDecodeErrorZ in the success state.
-pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::FundingCreated) -> CResult_FundingCreatedDecodeErrorZ {
- CResult_FundingCreatedDecodeErrorZ {
- contents: CResult_FundingCreatedDecodeErrorZPtr {
+/// Creates a new CResult_ShutdownDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ShutdownDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Shutdown) -> CResult_ShutdownDecodeErrorZ {
+ CResult_ShutdownDecodeErrorZ {
+ contents: CResult_ShutdownDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_FundingCreatedDecodeErrorZ in the error state.
-pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_FundingCreatedDecodeErrorZ {
- CResult_FundingCreatedDecodeErrorZ {
- contents: CResult_FundingCreatedDecodeErrorZPtr {
+/// Creates a new CResult_ShutdownDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ShutdownDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ShutdownDecodeErrorZ {
+ CResult_ShutdownDecodeErrorZ {
+ contents: CResult_ShutdownDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_is_ok(o: &CResult_FundingCreatedDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ShutdownDecodeErrorZ_is_ok(o: &CResult_ShutdownDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_FundingCreatedDecodeErrorZ.
-pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_free(_res: CResult_FundingCreatedDecodeErrorZ) { }
-impl Drop for CResult_FundingCreatedDecodeErrorZ {
+/// Frees any resources used by the CResult_ShutdownDecodeErrorZ.
+pub extern "C" fn CResult_ShutdownDecodeErrorZ_free(_res: CResult_ShutdownDecodeErrorZ) { }
+impl Drop for CResult_ShutdownDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::FundingCreated, crate::lightning::ln::msgs::DecodeError>> for CResult_FundingCreatedDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::FundingCreated, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Shutdown, crate::lightning::ln::msgs::DecodeError>> for CResult_ShutdownDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Shutdown, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_FundingCreatedDecodeErrorZPtr { result }
+ CResult_ShutdownDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_FundingCreatedDecodeErrorZPtr { err }
+ CResult_ShutdownDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_FundingCreatedDecodeErrorZ {
+impl Clone for CResult_ShutdownDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_FundingCreatedDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::FundingCreated>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ShutdownDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Shutdown>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_FundingCreatedDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ShutdownDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_FundingCreatedDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ShutdownDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_FundingCreatedDecodeErrorZ_clone(orig: &CResult_FundingCreatedDecodeErrorZ) -> CResult_FundingCreatedDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ShutdownDecodeErrorZ_clone(orig: &CResult_ShutdownDecodeErrorZ) -> CResult_ShutdownDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_FundingSignedDecodeErrorZ
-pub union CResult_FundingSignedDecodeErrorZPtr {
+/// The contents of CResult_UpdateFailHTLCDecodeErrorZ
+pub union CResult_UpdateFailHTLCDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::FundingSigned,
+ pub result: *mut crate::lightning::ln::msgs::UpdateFailHTLC,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_FundingSignedDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::FundingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_UpdateFailHTLCDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::UpdateFailHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_FundingSignedDecodeErrorZ {
- /// The contents of this CResult_FundingSignedDecodeErrorZ, accessible via either
+pub struct CResult_UpdateFailHTLCDecodeErrorZ {
+ /// The contents of this CResult_UpdateFailHTLCDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_FundingSignedDecodeErrorZPtr,
- /// Whether this CResult_FundingSignedDecodeErrorZ represents a success state.
+ pub contents: CResult_UpdateFailHTLCDecodeErrorZPtr,
+ /// Whether this CResult_UpdateFailHTLCDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_FundingSignedDecodeErrorZ in the success state.
-pub extern "C" fn CResult_FundingSignedDecodeErrorZ_ok(o: crate::lightning::ln::msgs::FundingSigned) -> CResult_FundingSignedDecodeErrorZ {
- CResult_FundingSignedDecodeErrorZ {
- contents: CResult_FundingSignedDecodeErrorZPtr {
+/// Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state.
+pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateFailHTLC) -> CResult_UpdateFailHTLCDecodeErrorZ {
+ CResult_UpdateFailHTLCDecodeErrorZ {
+ contents: CResult_UpdateFailHTLCDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_FundingSignedDecodeErrorZ in the error state.
-pub extern "C" fn CResult_FundingSignedDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_FundingSignedDecodeErrorZ {
- CResult_FundingSignedDecodeErrorZ {
- contents: CResult_FundingSignedDecodeErrorZPtr {
+/// Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state.
+pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateFailHTLCDecodeErrorZ {
+ CResult_UpdateFailHTLCDecodeErrorZ {
+ contents: CResult_UpdateFailHTLCDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_FundingSignedDecodeErrorZ_is_ok(o: &CResult_FundingSignedDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o: &CResult_UpdateFailHTLCDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_FundingSignedDecodeErrorZ.
-pub extern "C" fn CResult_FundingSignedDecodeErrorZ_free(_res: CResult_FundingSignedDecodeErrorZ) { }
-impl Drop for CResult_FundingSignedDecodeErrorZ {
+/// Frees any resources used by the CResult_UpdateFailHTLCDecodeErrorZ.
+pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_free(_res: CResult_UpdateFailHTLCDecodeErrorZ) { }
+impl Drop for CResult_UpdateFailHTLCDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::FundingSigned, crate::lightning::ln::msgs::DecodeError>> for CResult_FundingSignedDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::FundingSigned, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFailHTLC, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateFailHTLCDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFailHTLC, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_FundingSignedDecodeErrorZPtr { result }
+ CResult_UpdateFailHTLCDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_FundingSignedDecodeErrorZPtr { err }
+ CResult_UpdateFailHTLCDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_FundingSignedDecodeErrorZ {
+impl Clone for CResult_UpdateFailHTLCDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_FundingSignedDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::FundingSigned>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_UpdateFailHTLCDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateFailHTLC>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_FundingSignedDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_UpdateFailHTLCDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_FundingSignedDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_UpdateFailHTLCDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_FundingSignedDecodeErrorZ_clone(orig: &CResult_FundingSignedDecodeErrorZ) -> CResult_FundingSignedDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: &CResult_UpdateFailHTLCDecodeErrorZ) -> CResult_UpdateFailHTLCDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelReadyDecodeErrorZ
-pub union CResult_ChannelReadyDecodeErrorZPtr {
+/// The contents of CResult_UpdateFailMalformedHTLCDecodeErrorZ
+pub union CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ChannelReady,
+ pub result: *mut crate::lightning::ln::msgs::UpdateFailMalformedHTLC,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ChannelReadyDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ChannelReady on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_UpdateFailMalformedHTLCDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::UpdateFailMalformedHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelReadyDecodeErrorZ {
- /// The contents of this CResult_ChannelReadyDecodeErrorZ, accessible via either
+pub struct CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+ /// The contents of this CResult_UpdateFailMalformedHTLCDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelReadyDecodeErrorZPtr,
- /// Whether this CResult_ChannelReadyDecodeErrorZ represents a success state.
+ pub contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr,
+ /// Whether this CResult_UpdateFailMalformedHTLCDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ChannelReadyDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ChannelReady) -> CResult_ChannelReadyDecodeErrorZ {
- CResult_ChannelReadyDecodeErrorZ {
- contents: CResult_ChannelReadyDecodeErrorZPtr {
+/// Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state.
+pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateFailMalformedHTLC) -> CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+ CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+ contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelReadyDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelReadyDecodeErrorZ {
- CResult_ChannelReadyDecodeErrorZ {
- contents: CResult_ChannelReadyDecodeErrorZPtr {
+/// Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state.
+pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+ CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+ contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_is_ok(o: &CResult_ChannelReadyDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o: &CResult_UpdateFailMalformedHTLCDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelReadyDecodeErrorZ.
-pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_free(_res: CResult_ChannelReadyDecodeErrorZ) { }
-impl Drop for CResult_ChannelReadyDecodeErrorZ {
+/// Frees any resources used by the CResult_UpdateFailMalformedHTLCDecodeErrorZ.
+pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: CResult_UpdateFailMalformedHTLCDecodeErrorZ) { }
+impl Drop for CResult_UpdateFailMalformedHTLCDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelReady, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelReadyDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelReady, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFailMalformedHTLC, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFailMalformedHTLC, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelReadyDecodeErrorZPtr { result }
+ CResult_UpdateFailMalformedHTLCDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelReadyDecodeErrorZPtr { err }
+ CResult_UpdateFailMalformedHTLCDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChannelReadyDecodeErrorZ {
+impl Clone for CResult_UpdateFailMalformedHTLCDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelReadyDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ChannelReady>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateFailMalformedHTLC>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChannelReadyDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelReadyDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelReadyDecodeErrorZ_clone(orig: &CResult_ChannelReadyDecodeErrorZ) -> CResult_ChannelReadyDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: &CResult_UpdateFailMalformedHTLCDecodeErrorZ) -> CResult_UpdateFailMalformedHTLCDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_InitDecodeErrorZ
-pub union CResult_InitDecodeErrorZPtr {
+/// The contents of CResult_UpdateFeeDecodeErrorZ
+pub union CResult_UpdateFeeDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::Init,
+ pub result: *mut crate::lightning::ln::msgs::UpdateFee,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_InitDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::Init on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_UpdateFeeDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::UpdateFee on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_InitDecodeErrorZ {
- /// The contents of this CResult_InitDecodeErrorZ, accessible via either
+pub struct CResult_UpdateFeeDecodeErrorZ {
+ /// The contents of this CResult_UpdateFeeDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_InitDecodeErrorZPtr,
- /// Whether this CResult_InitDecodeErrorZ represents a success state.
+ pub contents: CResult_UpdateFeeDecodeErrorZPtr,
+ /// Whether this CResult_UpdateFeeDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_InitDecodeErrorZ in the success state.
-pub extern "C" fn CResult_InitDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Init) -> CResult_InitDecodeErrorZ {
- CResult_InitDecodeErrorZ {
- contents: CResult_InitDecodeErrorZPtr {
+/// Creates a new CResult_UpdateFeeDecodeErrorZ in the success state.
+pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateFee) -> CResult_UpdateFeeDecodeErrorZ {
+ CResult_UpdateFeeDecodeErrorZ {
+ contents: CResult_UpdateFeeDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_InitDecodeErrorZ in the error state.
-pub extern "C" fn CResult_InitDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_InitDecodeErrorZ {
- CResult_InitDecodeErrorZ {
- contents: CResult_InitDecodeErrorZPtr {
+/// Creates a new CResult_UpdateFeeDecodeErrorZ in the error state.
+pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateFeeDecodeErrorZ {
+ CResult_UpdateFeeDecodeErrorZ {
+ contents: CResult_UpdateFeeDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_InitDecodeErrorZ_is_ok(o: &CResult_InitDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_is_ok(o: &CResult_UpdateFeeDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_InitDecodeErrorZ.
-pub extern "C" fn CResult_InitDecodeErrorZ_free(_res: CResult_InitDecodeErrorZ) { }
-impl Drop for CResult_InitDecodeErrorZ {
+/// Frees any resources used by the CResult_UpdateFeeDecodeErrorZ.
+pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_free(_res: CResult_UpdateFeeDecodeErrorZ) { }
+impl Drop for CResult_UpdateFeeDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Init, crate::lightning::ln::msgs::DecodeError>> for CResult_InitDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Init, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFee, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateFeeDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFee, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_InitDecodeErrorZPtr { result }
+ CResult_UpdateFeeDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_InitDecodeErrorZPtr { err }
+ CResult_UpdateFeeDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_InitDecodeErrorZ {
+impl Clone for CResult_UpdateFeeDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_InitDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Init>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_UpdateFeeDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateFee>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_InitDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_UpdateFeeDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_InitDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_UpdateFeeDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_InitDecodeErrorZ_clone(orig: &CResult_InitDecodeErrorZ) -> CResult_InitDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_clone(orig: &CResult_UpdateFeeDecodeErrorZ) -> CResult_UpdateFeeDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_OpenChannelDecodeErrorZ
-pub union CResult_OpenChannelDecodeErrorZPtr {
+/// The contents of CResult_UpdateFulfillHTLCDecodeErrorZ
+pub union CResult_UpdateFulfillHTLCDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::OpenChannel,
+ pub result: *mut crate::lightning::ln::msgs::UpdateFulfillHTLC,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_OpenChannelDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::OpenChannel on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_UpdateFulfillHTLCDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::UpdateFulfillHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_OpenChannelDecodeErrorZ {
- /// The contents of this CResult_OpenChannelDecodeErrorZ, accessible via either
+pub struct CResult_UpdateFulfillHTLCDecodeErrorZ {
+ /// The contents of this CResult_UpdateFulfillHTLCDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_OpenChannelDecodeErrorZPtr,
- /// Whether this CResult_OpenChannelDecodeErrorZ represents a success state.
+ pub contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr,
+ /// Whether this CResult_UpdateFulfillHTLCDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_OpenChannelDecodeErrorZ in the success state.
-pub extern "C" fn CResult_OpenChannelDecodeErrorZ_ok(o: crate::lightning::ln::msgs::OpenChannel) -> CResult_OpenChannelDecodeErrorZ {
- CResult_OpenChannelDecodeErrorZ {
- contents: CResult_OpenChannelDecodeErrorZPtr {
+/// Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state.
+pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateFulfillHTLC) -> CResult_UpdateFulfillHTLCDecodeErrorZ {
+ CResult_UpdateFulfillHTLCDecodeErrorZ {
+ contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_OpenChannelDecodeErrorZ in the error state.
-pub extern "C" fn CResult_OpenChannelDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OpenChannelDecodeErrorZ {
- CResult_OpenChannelDecodeErrorZ {
- contents: CResult_OpenChannelDecodeErrorZPtr {
+/// Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state.
+pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateFulfillHTLCDecodeErrorZ {
+ CResult_UpdateFulfillHTLCDecodeErrorZ {
+ contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_OpenChannelDecodeErrorZ_is_ok(o: &CResult_OpenChannelDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o: &CResult_UpdateFulfillHTLCDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_OpenChannelDecodeErrorZ.
-pub extern "C" fn CResult_OpenChannelDecodeErrorZ_free(_res: CResult_OpenChannelDecodeErrorZ) { }
-impl Drop for CResult_OpenChannelDecodeErrorZ {
+/// Frees any resources used by the CResult_UpdateFulfillHTLCDecodeErrorZ.
+pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: CResult_UpdateFulfillHTLCDecodeErrorZ) { }
+impl Drop for CResult_UpdateFulfillHTLCDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::OpenChannel, crate::lightning::ln::msgs::DecodeError>> for CResult_OpenChannelDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::OpenChannel, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFulfillHTLC, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateFulfillHTLCDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFulfillHTLC, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_OpenChannelDecodeErrorZPtr { result }
+ CResult_UpdateFulfillHTLCDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_OpenChannelDecodeErrorZPtr { err }
+ CResult_UpdateFulfillHTLCDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_OpenChannelDecodeErrorZ {
+impl Clone for CResult_UpdateFulfillHTLCDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_OpenChannelDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::OpenChannel>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateFulfillHTLC>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_OpenChannelDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_OpenChannelDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_OpenChannelDecodeErrorZ_clone(orig: &CResult_OpenChannelDecodeErrorZ) -> CResult_OpenChannelDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: &CResult_UpdateFulfillHTLCDecodeErrorZ) -> CResult_UpdateFulfillHTLCDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_OpenChannelV2DecodeErrorZ
-pub union CResult_OpenChannelV2DecodeErrorZPtr {
+/// The contents of CResult_OnionPacketDecodeErrorZ
+pub union CResult_OnionPacketDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::OpenChannelV2,
+ pub result: *mut crate::lightning::ln::msgs::OnionPacket,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_OpenChannelV2DecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::OpenChannelV2 on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_OnionPacketDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::OnionPacket on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_OpenChannelV2DecodeErrorZ {
- /// The contents of this CResult_OpenChannelV2DecodeErrorZ, accessible via either
+pub struct CResult_OnionPacketDecodeErrorZ {
+ /// The contents of this CResult_OnionPacketDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_OpenChannelV2DecodeErrorZPtr,
- /// Whether this CResult_OpenChannelV2DecodeErrorZ represents a success state.
+ pub contents: CResult_OnionPacketDecodeErrorZPtr,
+ /// Whether this CResult_OnionPacketDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_OpenChannelV2DecodeErrorZ in the success state.
-pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_ok(o: crate::lightning::ln::msgs::OpenChannelV2) -> CResult_OpenChannelV2DecodeErrorZ {
- CResult_OpenChannelV2DecodeErrorZ {
- contents: CResult_OpenChannelV2DecodeErrorZPtr {
+/// Creates a new CResult_OnionPacketDecodeErrorZ in the success state.
+pub extern "C" fn CResult_OnionPacketDecodeErrorZ_ok(o: crate::lightning::ln::msgs::OnionPacket) -> CResult_OnionPacketDecodeErrorZ {
+ CResult_OnionPacketDecodeErrorZ {
+ contents: CResult_OnionPacketDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_OpenChannelV2DecodeErrorZ in the error state.
-pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OpenChannelV2DecodeErrorZ {
- CResult_OpenChannelV2DecodeErrorZ {
- contents: CResult_OpenChannelV2DecodeErrorZPtr {
+/// Creates a new CResult_OnionPacketDecodeErrorZ in the error state.
+pub extern "C" fn CResult_OnionPacketDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OnionPacketDecodeErrorZ {
+ CResult_OnionPacketDecodeErrorZ {
+ contents: CResult_OnionPacketDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_is_ok(o: &CResult_OpenChannelV2DecodeErrorZ) -> bool {
+pub extern "C" fn CResult_OnionPacketDecodeErrorZ_is_ok(o: &CResult_OnionPacketDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_OpenChannelV2DecodeErrorZ.
-pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_free(_res: CResult_OpenChannelV2DecodeErrorZ) { }
-impl Drop for CResult_OpenChannelV2DecodeErrorZ {
+/// Frees any resources used by the CResult_OnionPacketDecodeErrorZ.
+pub extern "C" fn CResult_OnionPacketDecodeErrorZ_free(_res: CResult_OnionPacketDecodeErrorZ) { }
+impl Drop for CResult_OnionPacketDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::OpenChannelV2, crate::lightning::ln::msgs::DecodeError>> for CResult_OpenChannelV2DecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::OpenChannelV2, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::OnionPacket, crate::lightning::ln::msgs::DecodeError>> for CResult_OnionPacketDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::OnionPacket, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_OpenChannelV2DecodeErrorZPtr { result }
+ CResult_OnionPacketDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_OpenChannelV2DecodeErrorZPtr { err }
+ CResult_OnionPacketDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_OpenChannelV2DecodeErrorZ {
+impl Clone for CResult_OnionPacketDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_OpenChannelV2DecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::OpenChannelV2>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_OnionPacketDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::OnionPacket>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_OpenChannelV2DecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_OnionPacketDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_OpenChannelV2DecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_OnionPacketDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_OpenChannelV2DecodeErrorZ_clone(orig: &CResult_OpenChannelV2DecodeErrorZ) -> CResult_OpenChannelV2DecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_OnionPacketDecodeErrorZ_clone(orig: &CResult_OnionPacketDecodeErrorZ) -> CResult_OnionPacketDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_RevokeAndACKDecodeErrorZ
-pub union CResult_RevokeAndACKDecodeErrorZPtr {
+/// The contents of CResult_UpdateAddHTLCDecodeErrorZ
+pub union CResult_UpdateAddHTLCDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::RevokeAndACK,
+ pub result: *mut crate::lightning::ln::msgs::UpdateAddHTLC,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_RevokeAndACKDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::RevokeAndACK on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_UpdateAddHTLCDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::UpdateAddHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_RevokeAndACKDecodeErrorZ {
- /// The contents of this CResult_RevokeAndACKDecodeErrorZ, accessible via either
+pub struct CResult_UpdateAddHTLCDecodeErrorZ {
+ /// The contents of this CResult_UpdateAddHTLCDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_RevokeAndACKDecodeErrorZPtr,
- /// Whether this CResult_RevokeAndACKDecodeErrorZ represents a success state.
+ pub contents: CResult_UpdateAddHTLCDecodeErrorZPtr,
+ /// Whether this CResult_UpdateAddHTLCDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state.
-pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_ok(o: crate::lightning::ln::msgs::RevokeAndACK) -> CResult_RevokeAndACKDecodeErrorZ {
- CResult_RevokeAndACKDecodeErrorZ {
- contents: CResult_RevokeAndACKDecodeErrorZPtr {
+/// Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state.
+pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateAddHTLC) -> CResult_UpdateAddHTLCDecodeErrorZ {
+ CResult_UpdateAddHTLCDecodeErrorZ {
+ contents: CResult_UpdateAddHTLCDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state.
-pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_RevokeAndACKDecodeErrorZ {
- CResult_RevokeAndACKDecodeErrorZ {
- contents: CResult_RevokeAndACKDecodeErrorZPtr {
+/// Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state.
+pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateAddHTLCDecodeErrorZ {
+ CResult_UpdateAddHTLCDecodeErrorZ {
+ contents: CResult_UpdateAddHTLCDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_is_ok(o: &CResult_RevokeAndACKDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o: &CResult_UpdateAddHTLCDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_RevokeAndACKDecodeErrorZ.
-pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_free(_res: CResult_RevokeAndACKDecodeErrorZ) { }
-impl Drop for CResult_RevokeAndACKDecodeErrorZ {
+/// Frees any resources used by the CResult_UpdateAddHTLCDecodeErrorZ.
+pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_free(_res: CResult_UpdateAddHTLCDecodeErrorZ) { }
+impl Drop for CResult_UpdateAddHTLCDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::RevokeAndACK, crate::lightning::ln::msgs::DecodeError>> for CResult_RevokeAndACKDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::RevokeAndACK, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateAddHTLC, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateAddHTLCDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateAddHTLC, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_RevokeAndACKDecodeErrorZPtr { result }
+ CResult_UpdateAddHTLCDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_RevokeAndACKDecodeErrorZPtr { err }
+ CResult_UpdateAddHTLCDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_RevokeAndACKDecodeErrorZ {
+impl Clone for CResult_UpdateAddHTLCDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_RevokeAndACKDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::RevokeAndACK>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_UpdateAddHTLCDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateAddHTLC>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_RevokeAndACKDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_UpdateAddHTLCDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_RevokeAndACKDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_UpdateAddHTLCDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_RevokeAndACKDecodeErrorZ_clone(orig: &CResult_RevokeAndACKDecodeErrorZ) -> CResult_RevokeAndACKDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: &CResult_UpdateAddHTLCDecodeErrorZ) -> CResult_UpdateAddHTLCDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ShutdownDecodeErrorZ
-pub union CResult_ShutdownDecodeErrorZPtr {
+/// The contents of CResult_OnionMessageDecodeErrorZ
+pub union CResult_OnionMessageDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::Shutdown,
+ pub result: *mut crate::lightning::ln::msgs::OnionMessage,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ShutdownDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::Shutdown on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_OnionMessageDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::OnionMessage on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ShutdownDecodeErrorZ {
- /// The contents of this CResult_ShutdownDecodeErrorZ, accessible via either
+pub struct CResult_OnionMessageDecodeErrorZ {
+ /// The contents of this CResult_OnionMessageDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ShutdownDecodeErrorZPtr,
- /// Whether this CResult_ShutdownDecodeErrorZ represents a success state.
+ pub contents: CResult_OnionMessageDecodeErrorZPtr,
+ /// Whether this CResult_OnionMessageDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ShutdownDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ShutdownDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Shutdown) -> CResult_ShutdownDecodeErrorZ {
- CResult_ShutdownDecodeErrorZ {
- contents: CResult_ShutdownDecodeErrorZPtr {
+/// Creates a new CResult_OnionMessageDecodeErrorZ in the success state.
+pub extern "C" fn CResult_OnionMessageDecodeErrorZ_ok(o: crate::lightning::ln::msgs::OnionMessage) -> CResult_OnionMessageDecodeErrorZ {
+ CResult_OnionMessageDecodeErrorZ {
+ contents: CResult_OnionMessageDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ShutdownDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ShutdownDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ShutdownDecodeErrorZ {
- CResult_ShutdownDecodeErrorZ {
- contents: CResult_ShutdownDecodeErrorZPtr {
+/// Creates a new CResult_OnionMessageDecodeErrorZ in the error state.
+pub extern "C" fn CResult_OnionMessageDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OnionMessageDecodeErrorZ {
+ CResult_OnionMessageDecodeErrorZ {
+ contents: CResult_OnionMessageDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ShutdownDecodeErrorZ_is_ok(o: &CResult_ShutdownDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_OnionMessageDecodeErrorZ_is_ok(o: &CResult_OnionMessageDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ShutdownDecodeErrorZ.
-pub extern "C" fn CResult_ShutdownDecodeErrorZ_free(_res: CResult_ShutdownDecodeErrorZ) { }
-impl Drop for CResult_ShutdownDecodeErrorZ {
+/// Frees any resources used by the CResult_OnionMessageDecodeErrorZ.
+pub extern "C" fn CResult_OnionMessageDecodeErrorZ_free(_res: CResult_OnionMessageDecodeErrorZ) { }
+impl Drop for CResult_OnionMessageDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Shutdown, crate::lightning::ln::msgs::DecodeError>> for CResult_ShutdownDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Shutdown, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::OnionMessage, crate::lightning::ln::msgs::DecodeError>> for CResult_OnionMessageDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::OnionMessage, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ShutdownDecodeErrorZPtr { result }
+ CResult_OnionMessageDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ShutdownDecodeErrorZPtr { err }
+ CResult_OnionMessageDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ShutdownDecodeErrorZ {
+impl Clone for CResult_OnionMessageDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ShutdownDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Shutdown>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_OnionMessageDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::OnionMessage>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ShutdownDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_OnionMessageDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ShutdownDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_OnionMessageDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ShutdownDecodeErrorZ_clone(orig: &CResult_ShutdownDecodeErrorZ) -> CResult_ShutdownDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_OnionMessageDecodeErrorZ_clone(orig: &CResult_OnionMessageDecodeErrorZ) -> CResult_OnionMessageDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_UpdateFailHTLCDecodeErrorZ
-pub union CResult_UpdateFailHTLCDecodeErrorZPtr {
+/// The contents of CResult_FinalOnionHopDataDecodeErrorZ
+pub union CResult_FinalOnionHopDataDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::UpdateFailHTLC,
+ pub result: *mut crate::lightning::ln::msgs::FinalOnionHopData,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_UpdateFailHTLCDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::UpdateFailHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_FinalOnionHopDataDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::FinalOnionHopData on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UpdateFailHTLCDecodeErrorZ {
- /// The contents of this CResult_UpdateFailHTLCDecodeErrorZ, accessible via either
+pub struct CResult_FinalOnionHopDataDecodeErrorZ {
+ /// The contents of this CResult_FinalOnionHopDataDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UpdateFailHTLCDecodeErrorZPtr,
- /// Whether this CResult_UpdateFailHTLCDecodeErrorZ represents a success state.
+ pub contents: CResult_FinalOnionHopDataDecodeErrorZPtr,
+ /// Whether this CResult_FinalOnionHopDataDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state.
-pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateFailHTLC) -> CResult_UpdateFailHTLCDecodeErrorZ {
- CResult_UpdateFailHTLCDecodeErrorZ {
- contents: CResult_UpdateFailHTLCDecodeErrorZPtr {
+/// Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the success state.
+pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_ok(o: crate::lightning::ln::msgs::FinalOnionHopData) -> CResult_FinalOnionHopDataDecodeErrorZ {
+ CResult_FinalOnionHopDataDecodeErrorZ {
+ contents: CResult_FinalOnionHopDataDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state.
-pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateFailHTLCDecodeErrorZ {
- CResult_UpdateFailHTLCDecodeErrorZ {
- contents: CResult_UpdateFailHTLCDecodeErrorZPtr {
+/// Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the error state.
+pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_FinalOnionHopDataDecodeErrorZ {
+ CResult_FinalOnionHopDataDecodeErrorZ {
+ contents: CResult_FinalOnionHopDataDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_is_ok(o: &CResult_UpdateFailHTLCDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_is_ok(o: &CResult_FinalOnionHopDataDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_UpdateFailHTLCDecodeErrorZ.
-pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_free(_res: CResult_UpdateFailHTLCDecodeErrorZ) { }
-impl Drop for CResult_UpdateFailHTLCDecodeErrorZ {
+/// Frees any resources used by the CResult_FinalOnionHopDataDecodeErrorZ.
+pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_free(_res: CResult_FinalOnionHopDataDecodeErrorZ) { }
+impl Drop for CResult_FinalOnionHopDataDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFailHTLC, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateFailHTLCDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFailHTLC, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::FinalOnionHopData, crate::lightning::ln::msgs::DecodeError>> for CResult_FinalOnionHopDataDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::FinalOnionHopData, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UpdateFailHTLCDecodeErrorZPtr { result }
+ CResult_FinalOnionHopDataDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UpdateFailHTLCDecodeErrorZPtr { err }
+ CResult_FinalOnionHopDataDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_UpdateFailHTLCDecodeErrorZ {
+impl Clone for CResult_FinalOnionHopDataDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_UpdateFailHTLCDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateFailHTLC>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_FinalOnionHopDataDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::FinalOnionHopData>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_UpdateFailHTLCDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_FinalOnionHopDataDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateFailHTLCDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_FinalOnionHopDataDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: &CResult_UpdateFailHTLCDecodeErrorZ) -> CResult_UpdateFailHTLCDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_clone(orig: &CResult_FinalOnionHopDataDecodeErrorZ) -> CResult_FinalOnionHopDataDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_UpdateFailMalformedHTLCDecodeErrorZ
-pub union CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
+/// The contents of CResult_PingDecodeErrorZ
+pub union CResult_PingDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::UpdateFailMalformedHTLC,
+ pub result: *mut crate::lightning::ln::msgs::Ping,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_UpdateFailMalformedHTLCDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::UpdateFailMalformedHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_PingDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::Ping on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UpdateFailMalformedHTLCDecodeErrorZ {
- /// The contents of this CResult_UpdateFailMalformedHTLCDecodeErrorZ, accessible via either
+pub struct CResult_PingDecodeErrorZ {
+ /// The contents of this CResult_PingDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr,
- /// Whether this CResult_UpdateFailMalformedHTLCDecodeErrorZ represents a success state.
+ pub contents: CResult_PingDecodeErrorZPtr,
+ /// Whether this CResult_PingDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state.
-pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateFailMalformedHTLC) -> CResult_UpdateFailMalformedHTLCDecodeErrorZ {
- CResult_UpdateFailMalformedHTLCDecodeErrorZ {
- contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
+/// Creates a new CResult_PingDecodeErrorZ in the success state.
+pub extern "C" fn CResult_PingDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Ping) -> CResult_PingDecodeErrorZ {
+ CResult_PingDecodeErrorZ {
+ contents: CResult_PingDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state.
-pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateFailMalformedHTLCDecodeErrorZ {
- CResult_UpdateFailMalformedHTLCDecodeErrorZ {
- contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
+/// Creates a new CResult_PingDecodeErrorZ in the error state.
+pub extern "C" fn CResult_PingDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PingDecodeErrorZ {
+ CResult_PingDecodeErrorZ {
+ contents: CResult_PingDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(o: &CResult_UpdateFailMalformedHTLCDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_PingDecodeErrorZ_is_ok(o: &CResult_PingDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_UpdateFailMalformedHTLCDecodeErrorZ.
-pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: CResult_UpdateFailMalformedHTLCDecodeErrorZ) { }
-impl Drop for CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+/// Frees any resources used by the CResult_PingDecodeErrorZ.
+pub extern "C" fn CResult_PingDecodeErrorZ_free(_res: CResult_PingDecodeErrorZ) { }
+impl Drop for CResult_PingDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFailMalformedHTLC, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateFailMalformedHTLCDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFailMalformedHTLC, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Ping, crate::lightning::ln::msgs::DecodeError>> for CResult_PingDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Ping, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UpdateFailMalformedHTLCDecodeErrorZPtr { result }
+ CResult_PingDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UpdateFailMalformedHTLCDecodeErrorZPtr { err }
+ CResult_PingDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_UpdateFailMalformedHTLCDecodeErrorZ {
+impl Clone for CResult_PingDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateFailMalformedHTLC>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_PingDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Ping>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_UpdateFailMalformedHTLCDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_PingDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_PingDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: &CResult_UpdateFailMalformedHTLCDecodeErrorZ) -> CResult_UpdateFailMalformedHTLCDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_PingDecodeErrorZ_clone(orig: &CResult_PingDecodeErrorZ) -> CResult_PingDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_UpdateFeeDecodeErrorZ
-pub union CResult_UpdateFeeDecodeErrorZPtr {
+/// The contents of CResult_PongDecodeErrorZ
+pub union CResult_PongDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::UpdateFee,
+ pub result: *mut crate::lightning::ln::msgs::Pong,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_UpdateFeeDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::UpdateFee on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_PongDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::Pong on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UpdateFeeDecodeErrorZ {
- /// The contents of this CResult_UpdateFeeDecodeErrorZ, accessible via either
+pub struct CResult_PongDecodeErrorZ {
+ /// The contents of this CResult_PongDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UpdateFeeDecodeErrorZPtr,
- /// Whether this CResult_UpdateFeeDecodeErrorZ represents a success state.
+ pub contents: CResult_PongDecodeErrorZPtr,
+ /// Whether this CResult_PongDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_UpdateFeeDecodeErrorZ in the success state.
-pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateFee) -> CResult_UpdateFeeDecodeErrorZ {
- CResult_UpdateFeeDecodeErrorZ {
- contents: CResult_UpdateFeeDecodeErrorZPtr {
+/// Creates a new CResult_PongDecodeErrorZ in the success state.
+pub extern "C" fn CResult_PongDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Pong) -> CResult_PongDecodeErrorZ {
+ CResult_PongDecodeErrorZ {
+ contents: CResult_PongDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateFeeDecodeErrorZ in the error state.
-pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateFeeDecodeErrorZ {
- CResult_UpdateFeeDecodeErrorZ {
- contents: CResult_UpdateFeeDecodeErrorZPtr {
+/// Creates a new CResult_PongDecodeErrorZ in the error state.
+pub extern "C" fn CResult_PongDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PongDecodeErrorZ {
+ CResult_PongDecodeErrorZ {
+ contents: CResult_PongDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_is_ok(o: &CResult_UpdateFeeDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_PongDecodeErrorZ_is_ok(o: &CResult_PongDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_UpdateFeeDecodeErrorZ.
-pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_free(_res: CResult_UpdateFeeDecodeErrorZ) { }
-impl Drop for CResult_UpdateFeeDecodeErrorZ {
+/// Frees any resources used by the CResult_PongDecodeErrorZ.
+pub extern "C" fn CResult_PongDecodeErrorZ_free(_res: CResult_PongDecodeErrorZ) { }
+impl Drop for CResult_PongDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFee, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateFeeDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFee, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Pong, crate::lightning::ln::msgs::DecodeError>> for CResult_PongDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Pong, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UpdateFeeDecodeErrorZPtr { result }
+ CResult_PongDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UpdateFeeDecodeErrorZPtr { err }
+ CResult_PongDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_UpdateFeeDecodeErrorZ {
+impl Clone for CResult_PongDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_UpdateFeeDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateFee>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_PongDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Pong>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_UpdateFeeDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_PongDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateFeeDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_PongDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UpdateFeeDecodeErrorZ_clone(orig: &CResult_UpdateFeeDecodeErrorZ) -> CResult_UpdateFeeDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_PongDecodeErrorZ_clone(orig: &CResult_PongDecodeErrorZ) -> CResult_PongDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_UpdateFulfillHTLCDecodeErrorZ
-pub union CResult_UpdateFulfillHTLCDecodeErrorZPtr {
+/// The contents of CResult_UnsignedChannelAnnouncementDecodeErrorZ
+pub union CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::UpdateFulfillHTLC,
+ pub result: *mut crate::lightning::ln::msgs::UnsignedChannelAnnouncement,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_UpdateFulfillHTLCDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::UpdateFulfillHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_UnsignedChannelAnnouncementDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::UnsignedChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UpdateFulfillHTLCDecodeErrorZ {
- /// The contents of this CResult_UpdateFulfillHTLCDecodeErrorZ, accessible via either
+pub struct CResult_UnsignedChannelAnnouncementDecodeErrorZ {
+ /// The contents of this CResult_UnsignedChannelAnnouncementDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr,
- /// Whether this CResult_UpdateFulfillHTLCDecodeErrorZ represents a success state.
+ pub contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr,
+ /// Whether this CResult_UnsignedChannelAnnouncementDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state.
-pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateFulfillHTLC) -> CResult_UpdateFulfillHTLCDecodeErrorZ {
- CResult_UpdateFulfillHTLCDecodeErrorZ {
- contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr {
+/// Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state.
+pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UnsignedChannelAnnouncement) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ {
+ CResult_UnsignedChannelAnnouncementDecodeErrorZ {
+ contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state.
-pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateFulfillHTLCDecodeErrorZ {
- CResult_UpdateFulfillHTLCDecodeErrorZ {
- contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr {
+/// Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state.
+pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ {
+ CResult_UnsignedChannelAnnouncementDecodeErrorZ {
+ contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(o: &CResult_UpdateFulfillHTLCDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o: &CResult_UnsignedChannelAnnouncementDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_UpdateFulfillHTLCDecodeErrorZ.
-pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: CResult_UpdateFulfillHTLCDecodeErrorZ) { }
-impl Drop for CResult_UpdateFulfillHTLCDecodeErrorZ {
+/// Frees any resources used by the CResult_UnsignedChannelAnnouncementDecodeErrorZ.
+pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: CResult_UnsignedChannelAnnouncementDecodeErrorZ) { }
+impl Drop for CResult_UnsignedChannelAnnouncementDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFulfillHTLC, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateFulfillHTLCDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateFulfillHTLC, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedChannelAnnouncement, crate::lightning::ln::msgs::DecodeError>> for CResult_UnsignedChannelAnnouncementDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedChannelAnnouncement, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UpdateFulfillHTLCDecodeErrorZPtr { result }
+ CResult_UnsignedChannelAnnouncementDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UpdateFulfillHTLCDecodeErrorZPtr { err }
+ CResult_UnsignedChannelAnnouncementDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_UpdateFulfillHTLCDecodeErrorZ {
+impl Clone for CResult_UnsignedChannelAnnouncementDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateFulfillHTLC>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UnsignedChannelAnnouncement>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_UpdateFulfillHTLCDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: &CResult_UpdateFulfillHTLCDecodeErrorZ) -> CResult_UpdateFulfillHTLCDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: &CResult_UnsignedChannelAnnouncementDecodeErrorZ) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_OnionPacketDecodeErrorZ
-pub union CResult_OnionPacketDecodeErrorZPtr {
+/// The contents of CResult_ChannelAnnouncementDecodeErrorZ
+pub union CResult_ChannelAnnouncementDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::OnionPacket,
+ pub result: *mut crate::lightning::ln::msgs::ChannelAnnouncement,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_OnionPacketDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::OnionPacket on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ChannelAnnouncementDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_OnionPacketDecodeErrorZ {
- /// The contents of this CResult_OnionPacketDecodeErrorZ, accessible via either
+pub struct CResult_ChannelAnnouncementDecodeErrorZ {
+ /// The contents of this CResult_ChannelAnnouncementDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_OnionPacketDecodeErrorZPtr,
- /// Whether this CResult_OnionPacketDecodeErrorZ represents a success state.
+ pub contents: CResult_ChannelAnnouncementDecodeErrorZPtr,
+ /// Whether this CResult_ChannelAnnouncementDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_OnionPacketDecodeErrorZ in the success state.
-pub extern "C" fn CResult_OnionPacketDecodeErrorZ_ok(o: crate::lightning::ln::msgs::OnionPacket) -> CResult_OnionPacketDecodeErrorZ {
- CResult_OnionPacketDecodeErrorZ {
- contents: CResult_OnionPacketDecodeErrorZPtr {
+/// Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ChannelAnnouncement) -> CResult_ChannelAnnouncementDecodeErrorZ {
+ CResult_ChannelAnnouncementDecodeErrorZ {
+ contents: CResult_ChannelAnnouncementDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_OnionPacketDecodeErrorZ in the error state.
-pub extern "C" fn CResult_OnionPacketDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OnionPacketDecodeErrorZ {
- CResult_OnionPacketDecodeErrorZ {
- contents: CResult_OnionPacketDecodeErrorZPtr {
+/// Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelAnnouncementDecodeErrorZ {
+ CResult_ChannelAnnouncementDecodeErrorZ {
+ contents: CResult_ChannelAnnouncementDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_OnionPacketDecodeErrorZ_is_ok(o: &CResult_OnionPacketDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o: &CResult_ChannelAnnouncementDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_OnionPacketDecodeErrorZ.
-pub extern "C" fn CResult_OnionPacketDecodeErrorZ_free(_res: CResult_OnionPacketDecodeErrorZ) { }
-impl Drop for CResult_OnionPacketDecodeErrorZ {
+/// Frees any resources used by the CResult_ChannelAnnouncementDecodeErrorZ.
+pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_free(_res: CResult_ChannelAnnouncementDecodeErrorZ) { }
+impl Drop for CResult_ChannelAnnouncementDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::OnionPacket, crate::lightning::ln::msgs::DecodeError>> for CResult_OnionPacketDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::OnionPacket, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelAnnouncement, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelAnnouncementDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelAnnouncement, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_OnionPacketDecodeErrorZPtr { result }
+ CResult_ChannelAnnouncementDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_OnionPacketDecodeErrorZPtr { err }
+ CResult_ChannelAnnouncementDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_OnionPacketDecodeErrorZ {
+impl Clone for CResult_ChannelAnnouncementDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_OnionPacketDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::OnionPacket>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ChannelAnnouncementDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ChannelAnnouncement>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_OnionPacketDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ChannelAnnouncementDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_OnionPacketDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ChannelAnnouncementDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_OnionPacketDecodeErrorZ_clone(orig: &CResult_OnionPacketDecodeErrorZ) -> CResult_OnionPacketDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: &CResult_ChannelAnnouncementDecodeErrorZ) -> CResult_ChannelAnnouncementDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_UpdateAddHTLCDecodeErrorZ
-pub union CResult_UpdateAddHTLCDecodeErrorZPtr {
+/// The contents of CResult_UnsignedChannelUpdateDecodeErrorZ
+pub union CResult_UnsignedChannelUpdateDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::UpdateAddHTLC,
+ pub result: *mut crate::lightning::ln::msgs::UnsignedChannelUpdate,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_UpdateAddHTLCDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::UpdateAddHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_UnsignedChannelUpdateDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::UnsignedChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UpdateAddHTLCDecodeErrorZ {
- /// The contents of this CResult_UpdateAddHTLCDecodeErrorZ, accessible via either
+pub struct CResult_UnsignedChannelUpdateDecodeErrorZ {
+ /// The contents of this CResult_UnsignedChannelUpdateDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UpdateAddHTLCDecodeErrorZPtr,
- /// Whether this CResult_UpdateAddHTLCDecodeErrorZ represents a success state.
+ pub contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr,
+ /// Whether this CResult_UnsignedChannelUpdateDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state.
-pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UpdateAddHTLC) -> CResult_UpdateAddHTLCDecodeErrorZ {
- CResult_UpdateAddHTLCDecodeErrorZ {
- contents: CResult_UpdateAddHTLCDecodeErrorZPtr {
+/// Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state.
+pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UnsignedChannelUpdate) -> CResult_UnsignedChannelUpdateDecodeErrorZ {
+ CResult_UnsignedChannelUpdateDecodeErrorZ {
+ contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state.
-pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UpdateAddHTLCDecodeErrorZ {
- CResult_UpdateAddHTLCDecodeErrorZ {
- contents: CResult_UpdateAddHTLCDecodeErrorZPtr {
+/// Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state.
+pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UnsignedChannelUpdateDecodeErrorZ {
+ CResult_UnsignedChannelUpdateDecodeErrorZ {
+ contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_is_ok(o: &CResult_UpdateAddHTLCDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o: &CResult_UnsignedChannelUpdateDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_UpdateAddHTLCDecodeErrorZ.
-pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_free(_res: CResult_UpdateAddHTLCDecodeErrorZ) { }
-impl Drop for CResult_UpdateAddHTLCDecodeErrorZ {
+/// Frees any resources used by the CResult_UnsignedChannelUpdateDecodeErrorZ.
+pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: CResult_UnsignedChannelUpdateDecodeErrorZ) { }
+impl Drop for CResult_UnsignedChannelUpdateDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateAddHTLC, crate::lightning::ln::msgs::DecodeError>> for CResult_UpdateAddHTLCDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UpdateAddHTLC, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedChannelUpdate, crate::lightning::ln::msgs::DecodeError>> for CResult_UnsignedChannelUpdateDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedChannelUpdate, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UpdateAddHTLCDecodeErrorZPtr { result }
+ CResult_UnsignedChannelUpdateDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UpdateAddHTLCDecodeErrorZPtr { err }
+ CResult_UnsignedChannelUpdateDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_UpdateAddHTLCDecodeErrorZ {
+impl Clone for CResult_UnsignedChannelUpdateDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_UpdateAddHTLCDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UpdateAddHTLC>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UnsignedChannelUpdate>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_UpdateAddHTLCDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_UpdateAddHTLCDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: &CResult_UpdateAddHTLCDecodeErrorZ) -> CResult_UpdateAddHTLCDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: &CResult_UnsignedChannelUpdateDecodeErrorZ) -> CResult_UnsignedChannelUpdateDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_OnionMessageDecodeErrorZ
-pub union CResult_OnionMessageDecodeErrorZPtr {
+/// The contents of CResult_ChannelUpdateDecodeErrorZ
+pub union CResult_ChannelUpdateDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::OnionMessage,
+ pub result: *mut crate::lightning::ln::msgs::ChannelUpdate,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_OnionMessageDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::OnionMessage on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ChannelUpdateDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_OnionMessageDecodeErrorZ {
- /// The contents of this CResult_OnionMessageDecodeErrorZ, accessible via either
+pub struct CResult_ChannelUpdateDecodeErrorZ {
+ /// The contents of this CResult_ChannelUpdateDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_OnionMessageDecodeErrorZPtr,
- /// Whether this CResult_OnionMessageDecodeErrorZ represents a success state.
+ pub contents: CResult_ChannelUpdateDecodeErrorZPtr,
+ /// Whether this CResult_ChannelUpdateDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_OnionMessageDecodeErrorZ in the success state.
-pub extern "C" fn CResult_OnionMessageDecodeErrorZ_ok(o: crate::lightning::ln::msgs::OnionMessage) -> CResult_OnionMessageDecodeErrorZ {
- CResult_OnionMessageDecodeErrorZ {
- contents: CResult_OnionMessageDecodeErrorZPtr {
+/// Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ChannelUpdate) -> CResult_ChannelUpdateDecodeErrorZ {
+ CResult_ChannelUpdateDecodeErrorZ {
+ contents: CResult_ChannelUpdateDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_OnionMessageDecodeErrorZ in the error state.
-pub extern "C" fn CResult_OnionMessageDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OnionMessageDecodeErrorZ {
- CResult_OnionMessageDecodeErrorZ {
- contents: CResult_OnionMessageDecodeErrorZPtr {
+/// Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelUpdateDecodeErrorZ {
+ CResult_ChannelUpdateDecodeErrorZ {
+ contents: CResult_ChannelUpdateDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_OnionMessageDecodeErrorZ_is_ok(o: &CResult_OnionMessageDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_is_ok(o: &CResult_ChannelUpdateDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_OnionMessageDecodeErrorZ.
-pub extern "C" fn CResult_OnionMessageDecodeErrorZ_free(_res: CResult_OnionMessageDecodeErrorZ) { }
-impl Drop for CResult_OnionMessageDecodeErrorZ {
+/// Frees any resources used by the CResult_ChannelUpdateDecodeErrorZ.
+pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_free(_res: CResult_ChannelUpdateDecodeErrorZ) { }
+impl Drop for CResult_ChannelUpdateDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::OnionMessage, crate::lightning::ln::msgs::DecodeError>> for CResult_OnionMessageDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::OnionMessage, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelUpdate, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelUpdateDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelUpdate, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_OnionMessageDecodeErrorZPtr { result }
+ CResult_ChannelUpdateDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_OnionMessageDecodeErrorZPtr { err }
+ CResult_ChannelUpdateDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_OnionMessageDecodeErrorZ {
+impl Clone for CResult_ChannelUpdateDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_OnionMessageDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::OnionMessage>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ChannelUpdateDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ChannelUpdate>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_OnionMessageDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ChannelUpdateDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_OnionMessageDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ChannelUpdateDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_OnionMessageDecodeErrorZ_clone(orig: &CResult_OnionMessageDecodeErrorZ) -> CResult_OnionMessageDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_clone(orig: &CResult_ChannelUpdateDecodeErrorZ) -> CResult_ChannelUpdateDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_FinalOnionHopDataDecodeErrorZ
-pub union CResult_FinalOnionHopDataDecodeErrorZPtr {
+/// The contents of CResult_ErrorMessageDecodeErrorZ
+pub union CResult_ErrorMessageDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::FinalOnionHopData,
+ pub result: *mut crate::lightning::ln::msgs::ErrorMessage,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_FinalOnionHopDataDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::FinalOnionHopData on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ErrorMessageDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ErrorMessage on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_FinalOnionHopDataDecodeErrorZ {
- /// The contents of this CResult_FinalOnionHopDataDecodeErrorZ, accessible via either
+pub struct CResult_ErrorMessageDecodeErrorZ {
+ /// The contents of this CResult_ErrorMessageDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_FinalOnionHopDataDecodeErrorZPtr,
- /// Whether this CResult_FinalOnionHopDataDecodeErrorZ represents a success state.
+ pub contents: CResult_ErrorMessageDecodeErrorZPtr,
+ /// Whether this CResult_ErrorMessageDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the success state.
-pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_ok(o: crate::lightning::ln::msgs::FinalOnionHopData) -> CResult_FinalOnionHopDataDecodeErrorZ {
- CResult_FinalOnionHopDataDecodeErrorZ {
- contents: CResult_FinalOnionHopDataDecodeErrorZPtr {
+/// Creates a new CResult_ErrorMessageDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ErrorMessage) -> CResult_ErrorMessageDecodeErrorZ {
+ CResult_ErrorMessageDecodeErrorZ {
+ contents: CResult_ErrorMessageDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_FinalOnionHopDataDecodeErrorZ in the error state.
-pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_FinalOnionHopDataDecodeErrorZ {
- CResult_FinalOnionHopDataDecodeErrorZ {
- contents: CResult_FinalOnionHopDataDecodeErrorZPtr {
+/// Creates a new CResult_ErrorMessageDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ErrorMessageDecodeErrorZ {
+ CResult_ErrorMessageDecodeErrorZ {
+ contents: CResult_ErrorMessageDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_is_ok(o: &CResult_FinalOnionHopDataDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_is_ok(o: &CResult_ErrorMessageDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_FinalOnionHopDataDecodeErrorZ.
-pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_free(_res: CResult_FinalOnionHopDataDecodeErrorZ) { }
-impl Drop for CResult_FinalOnionHopDataDecodeErrorZ {
+/// Frees any resources used by the CResult_ErrorMessageDecodeErrorZ.
+pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_free(_res: CResult_ErrorMessageDecodeErrorZ) { }
+impl Drop for CResult_ErrorMessageDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::FinalOnionHopData, crate::lightning::ln::msgs::DecodeError>> for CResult_FinalOnionHopDataDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::FinalOnionHopData, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ErrorMessage, crate::lightning::ln::msgs::DecodeError>> for CResult_ErrorMessageDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ErrorMessage, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_FinalOnionHopDataDecodeErrorZPtr { result }
+ CResult_ErrorMessageDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_FinalOnionHopDataDecodeErrorZPtr { err }
+ CResult_ErrorMessageDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_FinalOnionHopDataDecodeErrorZ {
+impl Clone for CResult_ErrorMessageDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_FinalOnionHopDataDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::FinalOnionHopData>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ErrorMessageDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ErrorMessage>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_FinalOnionHopDataDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ErrorMessageDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_FinalOnionHopDataDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ErrorMessageDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_FinalOnionHopDataDecodeErrorZ_clone(orig: &CResult_FinalOnionHopDataDecodeErrorZ) -> CResult_FinalOnionHopDataDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_clone(orig: &CResult_ErrorMessageDecodeErrorZ) -> CResult_ErrorMessageDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_PingDecodeErrorZ
-pub union CResult_PingDecodeErrorZPtr {
+/// The contents of CResult_WarningMessageDecodeErrorZ
+pub union CResult_WarningMessageDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::Ping,
+ pub result: *mut crate::lightning::ln::msgs::WarningMessage,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_PingDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::Ping on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_WarningMessageDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::WarningMessage on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_PingDecodeErrorZ {
- /// The contents of this CResult_PingDecodeErrorZ, accessible via either
+pub struct CResult_WarningMessageDecodeErrorZ {
+ /// The contents of this CResult_WarningMessageDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_PingDecodeErrorZPtr,
- /// Whether this CResult_PingDecodeErrorZ represents a success state.
+ pub contents: CResult_WarningMessageDecodeErrorZPtr,
+ /// Whether this CResult_WarningMessageDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_PingDecodeErrorZ in the success state.
-pub extern "C" fn CResult_PingDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Ping) -> CResult_PingDecodeErrorZ {
- CResult_PingDecodeErrorZ {
- contents: CResult_PingDecodeErrorZPtr {
+/// Creates a new CResult_WarningMessageDecodeErrorZ in the success state.
+pub extern "C" fn CResult_WarningMessageDecodeErrorZ_ok(o: crate::lightning::ln::msgs::WarningMessage) -> CResult_WarningMessageDecodeErrorZ {
+ CResult_WarningMessageDecodeErrorZ {
+ contents: CResult_WarningMessageDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_PingDecodeErrorZ in the error state.
-pub extern "C" fn CResult_PingDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PingDecodeErrorZ {
- CResult_PingDecodeErrorZ {
- contents: CResult_PingDecodeErrorZPtr {
+/// Creates a new CResult_WarningMessageDecodeErrorZ in the error state.
+pub extern "C" fn CResult_WarningMessageDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_WarningMessageDecodeErrorZ {
+ CResult_WarningMessageDecodeErrorZ {
+ contents: CResult_WarningMessageDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_PingDecodeErrorZ_is_ok(o: &CResult_PingDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_WarningMessageDecodeErrorZ_is_ok(o: &CResult_WarningMessageDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_PingDecodeErrorZ.
-pub extern "C" fn CResult_PingDecodeErrorZ_free(_res: CResult_PingDecodeErrorZ) { }
-impl Drop for CResult_PingDecodeErrorZ {
+/// Frees any resources used by the CResult_WarningMessageDecodeErrorZ.
+pub extern "C" fn CResult_WarningMessageDecodeErrorZ_free(_res: CResult_WarningMessageDecodeErrorZ) { }
+impl Drop for CResult_WarningMessageDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Ping, crate::lightning::ln::msgs::DecodeError>> for CResult_PingDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Ping, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::WarningMessage, crate::lightning::ln::msgs::DecodeError>> for CResult_WarningMessageDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::WarningMessage, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_PingDecodeErrorZPtr { result }
+ CResult_WarningMessageDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_PingDecodeErrorZPtr { err }
+ CResult_WarningMessageDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_PingDecodeErrorZ {
+impl Clone for CResult_WarningMessageDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_PingDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Ping>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_WarningMessageDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::WarningMessage>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_PingDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_WarningMessageDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_PingDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_WarningMessageDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_PingDecodeErrorZ_clone(orig: &CResult_PingDecodeErrorZ) -> CResult_PingDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_WarningMessageDecodeErrorZ_clone(orig: &CResult_WarningMessageDecodeErrorZ) -> CResult_WarningMessageDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_PongDecodeErrorZ
-pub union CResult_PongDecodeErrorZPtr {
+/// The contents of CResult_UnsignedNodeAnnouncementDecodeErrorZ
+pub union CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::Pong,
+ pub result: *mut crate::lightning::ln::msgs::UnsignedNodeAnnouncement,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_PongDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::Pong on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_UnsignedNodeAnnouncementDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::UnsignedNodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_PongDecodeErrorZ {
- /// The contents of this CResult_PongDecodeErrorZ, accessible via either
+pub struct CResult_UnsignedNodeAnnouncementDecodeErrorZ {
+ /// The contents of this CResult_UnsignedNodeAnnouncementDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_PongDecodeErrorZPtr,
- /// Whether this CResult_PongDecodeErrorZ represents a success state.
+ pub contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr,
+ /// Whether this CResult_UnsignedNodeAnnouncementDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_PongDecodeErrorZ in the success state.
-pub extern "C" fn CResult_PongDecodeErrorZ_ok(o: crate::lightning::ln::msgs::Pong) -> CResult_PongDecodeErrorZ {
- CResult_PongDecodeErrorZ {
- contents: CResult_PongDecodeErrorZPtr {
+/// Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state.
+pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UnsignedNodeAnnouncement) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ {
+ CResult_UnsignedNodeAnnouncementDecodeErrorZ {
+ contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_PongDecodeErrorZ in the error state.
-pub extern "C" fn CResult_PongDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_PongDecodeErrorZ {
- CResult_PongDecodeErrorZ {
- contents: CResult_PongDecodeErrorZPtr {
+/// Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state.
+pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ {
+ CResult_UnsignedNodeAnnouncementDecodeErrorZ {
+ contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_PongDecodeErrorZ_is_ok(o: &CResult_PongDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o: &CResult_UnsignedNodeAnnouncementDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_PongDecodeErrorZ.
-pub extern "C" fn CResult_PongDecodeErrorZ_free(_res: CResult_PongDecodeErrorZ) { }
-impl Drop for CResult_PongDecodeErrorZ {
+/// Frees any resources used by the CResult_UnsignedNodeAnnouncementDecodeErrorZ.
+pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: CResult_UnsignedNodeAnnouncementDecodeErrorZ) { }
+impl Drop for CResult_UnsignedNodeAnnouncementDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::Pong, crate::lightning::ln::msgs::DecodeError>> for CResult_PongDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::Pong, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedNodeAnnouncement, crate::lightning::ln::msgs::DecodeError>> for CResult_UnsignedNodeAnnouncementDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedNodeAnnouncement, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_PongDecodeErrorZPtr { result }
+ CResult_UnsignedNodeAnnouncementDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_PongDecodeErrorZPtr { err }
+ CResult_UnsignedNodeAnnouncementDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_PongDecodeErrorZ {
+impl Clone for CResult_UnsignedNodeAnnouncementDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_PongDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::Pong>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UnsignedNodeAnnouncement>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_PongDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_PongDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_PongDecodeErrorZ_clone(orig: &CResult_PongDecodeErrorZ) -> CResult_PongDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: &CResult_UnsignedNodeAnnouncementDecodeErrorZ) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_UnsignedChannelAnnouncementDecodeErrorZ
-pub union CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
+/// The contents of CResult_NodeAnnouncementDecodeErrorZ
+pub union CResult_NodeAnnouncementDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::UnsignedChannelAnnouncement,
+ pub result: *mut crate::lightning::ln::msgs::NodeAnnouncement,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_UnsignedChannelAnnouncementDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::UnsignedChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_NodeAnnouncementDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::NodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UnsignedChannelAnnouncementDecodeErrorZ {
- /// The contents of this CResult_UnsignedChannelAnnouncementDecodeErrorZ, accessible via either
+pub struct CResult_NodeAnnouncementDecodeErrorZ {
+ /// The contents of this CResult_NodeAnnouncementDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr,
- /// Whether this CResult_UnsignedChannelAnnouncementDecodeErrorZ represents a success state.
+ pub contents: CResult_NodeAnnouncementDecodeErrorZPtr,
+ /// Whether this CResult_NodeAnnouncementDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state.
-pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UnsignedChannelAnnouncement) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ {
- CResult_UnsignedChannelAnnouncementDecodeErrorZ {
- contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
+/// Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state.
+pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_ok(o: crate::lightning::ln::msgs::NodeAnnouncement) -> CResult_NodeAnnouncementDecodeErrorZ {
+ CResult_NodeAnnouncementDecodeErrorZ {
+ contents: CResult_NodeAnnouncementDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state.
-pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ {
- CResult_UnsignedChannelAnnouncementDecodeErrorZ {
- contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
+/// Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state.
+pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_NodeAnnouncementDecodeErrorZ {
+ CResult_NodeAnnouncementDecodeErrorZ {
+ contents: CResult_NodeAnnouncementDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(o: &CResult_UnsignedChannelAnnouncementDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_is_ok(o: &CResult_NodeAnnouncementDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_UnsignedChannelAnnouncementDecodeErrorZ.
-pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: CResult_UnsignedChannelAnnouncementDecodeErrorZ) { }
-impl Drop for CResult_UnsignedChannelAnnouncementDecodeErrorZ {
+/// Frees any resources used by the CResult_NodeAnnouncementDecodeErrorZ.
+pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_free(_res: CResult_NodeAnnouncementDecodeErrorZ) { }
+impl Drop for CResult_NodeAnnouncementDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedChannelAnnouncement, crate::lightning::ln::msgs::DecodeError>> for CResult_UnsignedChannelAnnouncementDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedChannelAnnouncement, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::NodeAnnouncement, crate::lightning::ln::msgs::DecodeError>> for CResult_NodeAnnouncementDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::NodeAnnouncement, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UnsignedChannelAnnouncementDecodeErrorZPtr { result }
+ CResult_NodeAnnouncementDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UnsignedChannelAnnouncementDecodeErrorZPtr { err }
+ CResult_NodeAnnouncementDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_UnsignedChannelAnnouncementDecodeErrorZ {
+impl Clone for CResult_NodeAnnouncementDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UnsignedChannelAnnouncement>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_NodeAnnouncementDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::NodeAnnouncement>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_UnsignedChannelAnnouncementDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_NodeAnnouncementDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_NodeAnnouncementDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: &CResult_UnsignedChannelAnnouncementDecodeErrorZ) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_clone(orig: &CResult_NodeAnnouncementDecodeErrorZ) -> CResult_NodeAnnouncementDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelAnnouncementDecodeErrorZ
-pub union CResult_ChannelAnnouncementDecodeErrorZPtr {
+/// The contents of CResult_QueryShortChannelIdsDecodeErrorZ
+pub union CResult_QueryShortChannelIdsDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ChannelAnnouncement,
+ pub result: *mut crate::lightning::ln::msgs::QueryShortChannelIds,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ChannelAnnouncementDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_QueryShortChannelIdsDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::QueryShortChannelIds on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelAnnouncementDecodeErrorZ {
- /// The contents of this CResult_ChannelAnnouncementDecodeErrorZ, accessible via either
+pub struct CResult_QueryShortChannelIdsDecodeErrorZ {
+ /// The contents of this CResult_QueryShortChannelIdsDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelAnnouncementDecodeErrorZPtr,
- /// Whether this CResult_ChannelAnnouncementDecodeErrorZ represents a success state.
+ pub contents: CResult_QueryShortChannelIdsDecodeErrorZPtr,
+ /// Whether this CResult_QueryShortChannelIdsDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ChannelAnnouncement) -> CResult_ChannelAnnouncementDecodeErrorZ {
- CResult_ChannelAnnouncementDecodeErrorZ {
- contents: CResult_ChannelAnnouncementDecodeErrorZPtr {
+/// Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state.
+pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: crate::lightning::ln::msgs::QueryShortChannelIds) -> CResult_QueryShortChannelIdsDecodeErrorZ {
+ CResult_QueryShortChannelIdsDecodeErrorZ {
+ contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelAnnouncementDecodeErrorZ {
- CResult_ChannelAnnouncementDecodeErrorZ {
- contents: CResult_ChannelAnnouncementDecodeErrorZPtr {
+/// Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state.
+pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_QueryShortChannelIdsDecodeErrorZ {
+ CResult_QueryShortChannelIdsDecodeErrorZ {
+ contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_is_ok(o: &CResult_ChannelAnnouncementDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o: &CResult_QueryShortChannelIdsDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelAnnouncementDecodeErrorZ.
-pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_free(_res: CResult_ChannelAnnouncementDecodeErrorZ) { }
-impl Drop for CResult_ChannelAnnouncementDecodeErrorZ {
+/// Frees any resources used by the CResult_QueryShortChannelIdsDecodeErrorZ.
+pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: CResult_QueryShortChannelIdsDecodeErrorZ) { }
+impl Drop for CResult_QueryShortChannelIdsDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelAnnouncement, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelAnnouncementDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelAnnouncement, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::QueryShortChannelIds, crate::lightning::ln::msgs::DecodeError>> for CResult_QueryShortChannelIdsDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::QueryShortChannelIds, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelAnnouncementDecodeErrorZPtr { result }
+ CResult_QueryShortChannelIdsDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelAnnouncementDecodeErrorZPtr { err }
+ CResult_QueryShortChannelIdsDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChannelAnnouncementDecodeErrorZ {
+impl Clone for CResult_QueryShortChannelIdsDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelAnnouncementDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ChannelAnnouncement>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::QueryShortChannelIds>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChannelAnnouncementDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelAnnouncementDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_QueryShortChannelIdsDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: &CResult_ChannelAnnouncementDecodeErrorZ) -> CResult_ChannelAnnouncementDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: &CResult_QueryShortChannelIdsDecodeErrorZ) -> CResult_QueryShortChannelIdsDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_UnsignedChannelUpdateDecodeErrorZ
-pub union CResult_UnsignedChannelUpdateDecodeErrorZPtr {
+/// The contents of CResult_ReplyShortChannelIdsEndDecodeErrorZ
+pub union CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::UnsignedChannelUpdate,
+ pub result: *mut crate::lightning::ln::msgs::ReplyShortChannelIdsEnd,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_UnsignedChannelUpdateDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::UnsignedChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ReplyShortChannelIdsEndDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ReplyShortChannelIdsEnd on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UnsignedChannelUpdateDecodeErrorZ {
- /// The contents of this CResult_UnsignedChannelUpdateDecodeErrorZ, accessible via either
+pub struct CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+ /// The contents of this CResult_ReplyShortChannelIdsEndDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr,
- /// Whether this CResult_UnsignedChannelUpdateDecodeErrorZ represents a success state.
+ pub contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr,
+ /// Whether this CResult_ReplyShortChannelIdsEndDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state.
-pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UnsignedChannelUpdate) -> CResult_UnsignedChannelUpdateDecodeErrorZ {
- CResult_UnsignedChannelUpdateDecodeErrorZ {
- contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
+/// Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ReplyShortChannelIdsEnd) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+ CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+ contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state.
-pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UnsignedChannelUpdateDecodeErrorZ {
- CResult_UnsignedChannelUpdateDecodeErrorZ {
- contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
+/// Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+ CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+ contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(o: &CResult_UnsignedChannelUpdateDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o: &CResult_ReplyShortChannelIdsEndDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_UnsignedChannelUpdateDecodeErrorZ.
-pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: CResult_UnsignedChannelUpdateDecodeErrorZ) { }
-impl Drop for CResult_UnsignedChannelUpdateDecodeErrorZ {
+/// Frees any resources used by the CResult_ReplyShortChannelIdsEndDecodeErrorZ.
+pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: CResult_ReplyShortChannelIdsEndDecodeErrorZ) { }
+impl Drop for CResult_ReplyShortChannelIdsEndDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedChannelUpdate, crate::lightning::ln::msgs::DecodeError>> for CResult_UnsignedChannelUpdateDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedChannelUpdate, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ReplyShortChannelIdsEnd, crate::lightning::ln::msgs::DecodeError>> for CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ReplyShortChannelIdsEnd, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UnsignedChannelUpdateDecodeErrorZPtr { result }
+ CResult_ReplyShortChannelIdsEndDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UnsignedChannelUpdateDecodeErrorZPtr { err }
+ CResult_ReplyShortChannelIdsEndDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_UnsignedChannelUpdateDecodeErrorZ {
+impl Clone for CResult_ReplyShortChannelIdsEndDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UnsignedChannelUpdate>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ReplyShortChannelIdsEnd>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_UnsignedChannelUpdateDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: &CResult_UnsignedChannelUpdateDecodeErrorZ) -> CResult_UnsignedChannelUpdateDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: &CResult_ReplyShortChannelIdsEndDecodeErrorZ) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ChannelUpdateDecodeErrorZ
-pub union CResult_ChannelUpdateDecodeErrorZPtr {
+/// The contents of CResult_QueryChannelRangeDecodeErrorZ
+pub union CResult_QueryChannelRangeDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ChannelUpdate,
+ pub result: *mut crate::lightning::ln::msgs::QueryChannelRange,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ChannelUpdateDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_QueryChannelRangeDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::QueryChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ChannelUpdateDecodeErrorZ {
- /// The contents of this CResult_ChannelUpdateDecodeErrorZ, accessible via either
+pub struct CResult_QueryChannelRangeDecodeErrorZ {
+ /// The contents of this CResult_QueryChannelRangeDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ChannelUpdateDecodeErrorZPtr,
- /// Whether this CResult_ChannelUpdateDecodeErrorZ represents a success state.
+ pub contents: CResult_QueryChannelRangeDecodeErrorZPtr,
+ /// Whether this CResult_QueryChannelRangeDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ChannelUpdate) -> CResult_ChannelUpdateDecodeErrorZ {
- CResult_ChannelUpdateDecodeErrorZ {
- contents: CResult_ChannelUpdateDecodeErrorZPtr {
+/// Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state.
+pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_ok(o: crate::lightning::ln::msgs::QueryChannelRange) -> CResult_QueryChannelRangeDecodeErrorZ {
+ CResult_QueryChannelRangeDecodeErrorZ {
+ contents: CResult_QueryChannelRangeDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelUpdateDecodeErrorZ {
- CResult_ChannelUpdateDecodeErrorZ {
- contents: CResult_ChannelUpdateDecodeErrorZPtr {
+/// Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state.
+pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_QueryChannelRangeDecodeErrorZ {
+ CResult_QueryChannelRangeDecodeErrorZ {
+ contents: CResult_QueryChannelRangeDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_is_ok(o: &CResult_ChannelUpdateDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_is_ok(o: &CResult_QueryChannelRangeDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ChannelUpdateDecodeErrorZ.
-pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_free(_res: CResult_ChannelUpdateDecodeErrorZ) { }
-impl Drop for CResult_ChannelUpdateDecodeErrorZ {
+/// Frees any resources used by the CResult_QueryChannelRangeDecodeErrorZ.
+pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_free(_res: CResult_QueryChannelRangeDecodeErrorZ) { }
+impl Drop for CResult_QueryChannelRangeDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelUpdate, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelUpdateDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ChannelUpdate, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::QueryChannelRange, crate::lightning::ln::msgs::DecodeError>> for CResult_QueryChannelRangeDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::QueryChannelRange, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ChannelUpdateDecodeErrorZPtr { result }
+ CResult_QueryChannelRangeDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ChannelUpdateDecodeErrorZPtr { err }
+ CResult_QueryChannelRangeDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ChannelUpdateDecodeErrorZ {
+impl Clone for CResult_QueryChannelRangeDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ChannelUpdateDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ChannelUpdate>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_QueryChannelRangeDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::QueryChannelRange>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ChannelUpdateDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_QueryChannelRangeDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ChannelUpdateDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ChannelUpdateDecodeErrorZ_clone(orig: &CResult_ChannelUpdateDecodeErrorZ) -> CResult_ChannelUpdateDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_clone(orig: &CResult_QueryChannelRangeDecodeErrorZ) -> CResult_QueryChannelRangeDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ErrorMessageDecodeErrorZ
-pub union CResult_ErrorMessageDecodeErrorZPtr {
+/// The contents of CResult_ReplyChannelRangeDecodeErrorZ
+pub union CResult_ReplyChannelRangeDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ErrorMessage,
+ pub result: *mut crate::lightning::ln::msgs::ReplyChannelRange,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ErrorMessageDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ErrorMessage on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ReplyChannelRangeDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::ReplyChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ErrorMessageDecodeErrorZ {
- /// The contents of this CResult_ErrorMessageDecodeErrorZ, accessible via either
+pub struct CResult_ReplyChannelRangeDecodeErrorZ {
+ /// The contents of this CResult_ReplyChannelRangeDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ErrorMessageDecodeErrorZPtr,
- /// Whether this CResult_ErrorMessageDecodeErrorZ represents a success state.
+ pub contents: CResult_ReplyChannelRangeDecodeErrorZPtr,
+ /// Whether this CResult_ReplyChannelRangeDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ErrorMessageDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ErrorMessage) -> CResult_ErrorMessageDecodeErrorZ {
- CResult_ErrorMessageDecodeErrorZ {
- contents: CResult_ErrorMessageDecodeErrorZPtr {
+/// Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ReplyChannelRange) -> CResult_ReplyChannelRangeDecodeErrorZ {
+ CResult_ReplyChannelRangeDecodeErrorZ {
+ contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ErrorMessageDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ErrorMessageDecodeErrorZ {
- CResult_ErrorMessageDecodeErrorZ {
- contents: CResult_ErrorMessageDecodeErrorZPtr {
+/// Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ReplyChannelRangeDecodeErrorZ {
+ CResult_ReplyChannelRangeDecodeErrorZ {
+ contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_is_ok(o: &CResult_ErrorMessageDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o: &CResult_ReplyChannelRangeDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ErrorMessageDecodeErrorZ.
-pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_free(_res: CResult_ErrorMessageDecodeErrorZ) { }
-impl Drop for CResult_ErrorMessageDecodeErrorZ {
+/// Frees any resources used by the CResult_ReplyChannelRangeDecodeErrorZ.
+pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_free(_res: CResult_ReplyChannelRangeDecodeErrorZ) { }
+impl Drop for CResult_ReplyChannelRangeDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ErrorMessage, crate::lightning::ln::msgs::DecodeError>> for CResult_ErrorMessageDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ErrorMessage, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ReplyChannelRange, crate::lightning::ln::msgs::DecodeError>> for CResult_ReplyChannelRangeDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ReplyChannelRange, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ErrorMessageDecodeErrorZPtr { result }
+ CResult_ReplyChannelRangeDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ErrorMessageDecodeErrorZPtr { err }
+ CResult_ReplyChannelRangeDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ErrorMessageDecodeErrorZ {
+impl Clone for CResult_ReplyChannelRangeDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ErrorMessageDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ErrorMessage>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ReplyChannelRange>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ErrorMessageDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ErrorMessageDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ReplyChannelRangeDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ErrorMessageDecodeErrorZ_clone(orig: &CResult_ErrorMessageDecodeErrorZ) -> CResult_ErrorMessageDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: &CResult_ReplyChannelRangeDecodeErrorZ) -> CResult_ReplyChannelRangeDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_WarningMessageDecodeErrorZ
-pub union CResult_WarningMessageDecodeErrorZPtr {
+/// The contents of CResult_GossipTimestampFilterDecodeErrorZ
+pub union CResult_GossipTimestampFilterDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::WarningMessage,
+ pub result: *mut crate::lightning::ln::msgs::GossipTimestampFilter,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_WarningMessageDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::WarningMessage on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_GossipTimestampFilterDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::msgs::GossipTimestampFilter on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_WarningMessageDecodeErrorZ {
- /// The contents of this CResult_WarningMessageDecodeErrorZ, accessible via either
+pub struct CResult_GossipTimestampFilterDecodeErrorZ {
+ /// The contents of this CResult_GossipTimestampFilterDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_WarningMessageDecodeErrorZPtr,
- /// Whether this CResult_WarningMessageDecodeErrorZ represents a success state.
+ pub contents: CResult_GossipTimestampFilterDecodeErrorZPtr,
+ /// Whether this CResult_GossipTimestampFilterDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_WarningMessageDecodeErrorZ in the success state.
-pub extern "C" fn CResult_WarningMessageDecodeErrorZ_ok(o: crate::lightning::ln::msgs::WarningMessage) -> CResult_WarningMessageDecodeErrorZ {
- CResult_WarningMessageDecodeErrorZ {
- contents: CResult_WarningMessageDecodeErrorZPtr {
+/// Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state.
+pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_ok(o: crate::lightning::ln::msgs::GossipTimestampFilter) -> CResult_GossipTimestampFilterDecodeErrorZ {
+ CResult_GossipTimestampFilterDecodeErrorZ {
+ contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_WarningMessageDecodeErrorZ in the error state.
-pub extern "C" fn CResult_WarningMessageDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_WarningMessageDecodeErrorZ {
- CResult_WarningMessageDecodeErrorZ {
- contents: CResult_WarningMessageDecodeErrorZPtr {
+/// Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state.
+pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_GossipTimestampFilterDecodeErrorZ {
+ CResult_GossipTimestampFilterDecodeErrorZ {
+ contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_WarningMessageDecodeErrorZ_is_ok(o: &CResult_WarningMessageDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o: &CResult_GossipTimestampFilterDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_WarningMessageDecodeErrorZ.
-pub extern "C" fn CResult_WarningMessageDecodeErrorZ_free(_res: CResult_WarningMessageDecodeErrorZ) { }
-impl Drop for CResult_WarningMessageDecodeErrorZ {
+/// Frees any resources used by the CResult_GossipTimestampFilterDecodeErrorZ.
+pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_free(_res: CResult_GossipTimestampFilterDecodeErrorZ) { }
+impl Drop for CResult_GossipTimestampFilterDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::WarningMessage, crate::lightning::ln::msgs::DecodeError>> for CResult_WarningMessageDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::WarningMessage, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::GossipTimestampFilter, crate::lightning::ln::msgs::DecodeError>> for CResult_GossipTimestampFilterDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::GossipTimestampFilter, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_WarningMessageDecodeErrorZPtr { result }
+ CResult_GossipTimestampFilterDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_WarningMessageDecodeErrorZPtr { err }
+ CResult_GossipTimestampFilterDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_WarningMessageDecodeErrorZ {
+impl Clone for CResult_GossipTimestampFilterDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_WarningMessageDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::WarningMessage>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::GossipTimestampFilter>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_WarningMessageDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_WarningMessageDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_GossipTimestampFilterDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_WarningMessageDecodeErrorZ_clone(orig: &CResult_WarningMessageDecodeErrorZ) -> CResult_WarningMessageDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: &CResult_GossipTimestampFilterDecodeErrorZ) -> CResult_GossipTimestampFilterDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_UnsignedNodeAnnouncementDecodeErrorZ
-pub union CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
+/// A dynamically-allocated array of crate::lightning::ln::channelmanager::PhantomRouteHintss of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_PhantomRouteHintsZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::lightning::ln::channelmanager::PhantomRouteHints,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
+}
+impl CVec_PhantomRouteHintsZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::channelmanager::PhantomRouteHints> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
+ }
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::channelmanager::PhantomRouteHints] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ }
+}
+impl From<Vec<crate::lightning::ln::channelmanager::PhantomRouteHints>> for CVec_PhantomRouteHintsZ {
+ fn from(v: Vec<crate::lightning::ln::channelmanager::PhantomRouteHints>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
+}
+#[no_mangle]
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_PhantomRouteHintsZ_free(_res: CVec_PhantomRouteHintsZ) { }
+impl Drop for CVec_PhantomRouteHintsZ {
+ fn drop(&mut self) {
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ }
+}
+impl Clone for CVec_PhantomRouteHintsZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
+#[repr(C)]
+/// The contents of CResult_Bolt11InvoiceSignOrCreationErrorZ
+pub union CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::UnsignedNodeAnnouncement,
+ pub result: *mut crate::lightning_invoice::Bolt11Invoice,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning::ln::msgs::DecodeError,
+ pub err: *mut crate::lightning_invoice::SignOrCreationError,
}
#[repr(C)]
-/// A CResult_UnsignedNodeAnnouncementDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::UnsignedNodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_Bolt11InvoiceSignOrCreationErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning_invoice::Bolt11Invoice on success and a crate::lightning_invoice::SignOrCreationError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_UnsignedNodeAnnouncementDecodeErrorZ {
- /// The contents of this CResult_UnsignedNodeAnnouncementDecodeErrorZ, accessible via either
+pub struct CResult_Bolt11InvoiceSignOrCreationErrorZ {
+ /// The contents of this CResult_Bolt11InvoiceSignOrCreationErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr,
- /// Whether this CResult_UnsignedNodeAnnouncementDecodeErrorZ represents a success state.
+ pub contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr,
+ /// Whether this CResult_Bolt11InvoiceSignOrCreationErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state.
-pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: crate::lightning::ln::msgs::UnsignedNodeAnnouncement) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ {
- CResult_UnsignedNodeAnnouncementDecodeErrorZ {
- contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
+/// Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the success state.
+pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o: crate::lightning_invoice::Bolt11Invoice) -> CResult_Bolt11InvoiceSignOrCreationErrorZ {
+ CResult_Bolt11InvoiceSignOrCreationErrorZ {
+ contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state.
-pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ {
- CResult_UnsignedNodeAnnouncementDecodeErrorZ {
- contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
+/// Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the error state.
+pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_err(e: crate::lightning_invoice::SignOrCreationError) -> CResult_Bolt11InvoiceSignOrCreationErrorZ {
+ CResult_Bolt11InvoiceSignOrCreationErrorZ {
+ contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(o: &CResult_UnsignedNodeAnnouncementDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(o: &CResult_Bolt11InvoiceSignOrCreationErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_UnsignedNodeAnnouncementDecodeErrorZ.
-pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: CResult_UnsignedNodeAnnouncementDecodeErrorZ) { }
-impl Drop for CResult_UnsignedNodeAnnouncementDecodeErrorZ {
+/// Frees any resources used by the CResult_Bolt11InvoiceSignOrCreationErrorZ.
+pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_free(_res: CResult_Bolt11InvoiceSignOrCreationErrorZ) { }
+impl Drop for CResult_Bolt11InvoiceSignOrCreationErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedNodeAnnouncement, crate::lightning::ln::msgs::DecodeError>> for CResult_UnsignedNodeAnnouncementDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::UnsignedNodeAnnouncement, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning_invoice::Bolt11Invoice, crate::lightning_invoice::SignOrCreationError>> for CResult_Bolt11InvoiceSignOrCreationErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning_invoice::Bolt11Invoice, crate::lightning_invoice::SignOrCreationError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_UnsignedNodeAnnouncementDecodeErrorZPtr { result }
+ CResult_Bolt11InvoiceSignOrCreationErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_UnsignedNodeAnnouncementDecodeErrorZPtr { err }
+ CResult_Bolt11InvoiceSignOrCreationErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_UnsignedNodeAnnouncementDecodeErrorZ {
+impl Clone for CResult_Bolt11InvoiceSignOrCreationErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::UnsignedNodeAnnouncement>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning_invoice::Bolt11Invoice>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_UnsignedNodeAnnouncementDecodeErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning_invoice::SignOrCreationError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: &CResult_UnsignedNodeAnnouncementDecodeErrorZ) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(orig: &CResult_Bolt11InvoiceSignOrCreationErrorZ) -> CResult_Bolt11InvoiceSignOrCreationErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_NodeAnnouncementDecodeErrorZ
-pub union CResult_NodeAnnouncementDecodeErrorZPtr {
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::ln::channel_state::InboundHTLCStateDetails or not
+pub enum COption_InboundHTLCStateDetailsZ {
+ /// When we're in this state, this COption_InboundHTLCStateDetailsZ contains a crate::lightning::ln::channel_state::InboundHTLCStateDetails
+ Some(crate::lightning::ln::channel_state::InboundHTLCStateDetails),
+ /// When we're in this state, this COption_InboundHTLCStateDetailsZ contains nothing
+ None
+}
+impl COption_InboundHTLCStateDetailsZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::ln::channel_state::InboundHTLCStateDetails {
+ if let Self::Some(v) = self { v } else { unreachable!() }
+ }
+}
+#[no_mangle]
+/// Constructs a new COption_InboundHTLCStateDetailsZ containing a crate::lightning::ln::channel_state::InboundHTLCStateDetails
+pub extern "C" fn COption_InboundHTLCStateDetailsZ_some(o: crate::lightning::ln::channel_state::InboundHTLCStateDetails) -> COption_InboundHTLCStateDetailsZ {
+ COption_InboundHTLCStateDetailsZ::Some(o)
+}
+#[no_mangle]
+/// Constructs a new COption_InboundHTLCStateDetailsZ containing nothing
+pub extern "C" fn COption_InboundHTLCStateDetailsZ_none() -> COption_InboundHTLCStateDetailsZ {
+ COption_InboundHTLCStateDetailsZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the crate::lightning::ln::channel_state::InboundHTLCStateDetails, if we are in the Some state
+pub extern "C" fn COption_InboundHTLCStateDetailsZ_free(_res: COption_InboundHTLCStateDetailsZ) { }
+#[no_mangle]
+/// Creates a new COption_InboundHTLCStateDetailsZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_InboundHTLCStateDetailsZ_clone(orig: &COption_InboundHTLCStateDetailsZ) -> COption_InboundHTLCStateDetailsZ { Clone::clone(&orig) }
+#[repr(C)]
+/// The contents of CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ
+pub union CResult_COption_InboundHTLCStateDetailsZDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::NodeAnnouncement,
+ pub result: *mut crate::c_types::derived::COption_InboundHTLCStateDetailsZ,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_NodeAnnouncementDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::NodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::COption_InboundHTLCStateDetailsZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_NodeAnnouncementDecodeErrorZ {
- /// The contents of this CResult_NodeAnnouncementDecodeErrorZ, accessible via either
+pub struct CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ {
+ /// The contents of this CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_NodeAnnouncementDecodeErrorZPtr,
- /// Whether this CResult_NodeAnnouncementDecodeErrorZ represents a success state.
+ pub contents: CResult_COption_InboundHTLCStateDetailsZDecodeErrorZPtr,
+ /// Whether this CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state.
-pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_ok(o: crate::lightning::ln::msgs::NodeAnnouncement) -> CResult_NodeAnnouncementDecodeErrorZ {
- CResult_NodeAnnouncementDecodeErrorZ {
- contents: CResult_NodeAnnouncementDecodeErrorZPtr {
+/// Creates a new CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ in the success state.
+pub extern "C" fn CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ_ok(o: crate::c_types::derived::COption_InboundHTLCStateDetailsZ) -> CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ {
+ CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ {
+ contents: CResult_COption_InboundHTLCStateDetailsZDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state.
-pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_NodeAnnouncementDecodeErrorZ {
- CResult_NodeAnnouncementDecodeErrorZ {
- contents: CResult_NodeAnnouncementDecodeErrorZPtr {
+/// Creates a new CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ in the error state.
+pub extern "C" fn CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ {
+ CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ {
+ contents: CResult_COption_InboundHTLCStateDetailsZDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_is_ok(o: &CResult_NodeAnnouncementDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ_is_ok(o: &CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_NodeAnnouncementDecodeErrorZ.
-pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_free(_res: CResult_NodeAnnouncementDecodeErrorZ) { }
-impl Drop for CResult_NodeAnnouncementDecodeErrorZ {
+/// Frees any resources used by the CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ.
+pub extern "C" fn CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ_free(_res: CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ) { }
+impl Drop for CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::NodeAnnouncement, crate::lightning::ln::msgs::DecodeError>> for CResult_NodeAnnouncementDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::NodeAnnouncement, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_InboundHTLCStateDetailsZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_InboundHTLCStateDetailsZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_NodeAnnouncementDecodeErrorZPtr { result }
+ CResult_COption_InboundHTLCStateDetailsZDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_NodeAnnouncementDecodeErrorZPtr { err }
+ CResult_COption_InboundHTLCStateDetailsZDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_NodeAnnouncementDecodeErrorZ {
+impl Clone for CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_NodeAnnouncementDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::NodeAnnouncement>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_COption_InboundHTLCStateDetailsZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::COption_InboundHTLCStateDetailsZ>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_NodeAnnouncementDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_COption_InboundHTLCStateDetailsZDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_NodeAnnouncementDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_NodeAnnouncementDecodeErrorZ_clone(orig: &CResult_NodeAnnouncementDecodeErrorZ) -> CResult_NodeAnnouncementDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ_clone(orig: &CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ) -> CResult_COption_InboundHTLCStateDetailsZDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_QueryShortChannelIdsDecodeErrorZ
-pub union CResult_QueryShortChannelIdsDecodeErrorZPtr {
+/// The contents of CResult_InboundHTLCDetailsDecodeErrorZ
+pub union CResult_InboundHTLCDetailsDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::QueryShortChannelIds,
+ pub result: *mut crate::lightning::ln::channel_state::InboundHTLCDetails,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_QueryShortChannelIdsDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::QueryShortChannelIds on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_InboundHTLCDetailsDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channel_state::InboundHTLCDetails on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_QueryShortChannelIdsDecodeErrorZ {
- /// The contents of this CResult_QueryShortChannelIdsDecodeErrorZ, accessible via either
+pub struct CResult_InboundHTLCDetailsDecodeErrorZ {
+ /// The contents of this CResult_InboundHTLCDetailsDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_QueryShortChannelIdsDecodeErrorZPtr,
- /// Whether this CResult_QueryShortChannelIdsDecodeErrorZ represents a success state.
+ pub contents: CResult_InboundHTLCDetailsDecodeErrorZPtr,
+ /// Whether this CResult_InboundHTLCDetailsDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state.
-pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: crate::lightning::ln::msgs::QueryShortChannelIds) -> CResult_QueryShortChannelIdsDecodeErrorZ {
- CResult_QueryShortChannelIdsDecodeErrorZ {
- contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
+/// Creates a new CResult_InboundHTLCDetailsDecodeErrorZ in the success state.
+pub extern "C" fn CResult_InboundHTLCDetailsDecodeErrorZ_ok(o: crate::lightning::ln::channel_state::InboundHTLCDetails) -> CResult_InboundHTLCDetailsDecodeErrorZ {
+ CResult_InboundHTLCDetailsDecodeErrorZ {
+ contents: CResult_InboundHTLCDetailsDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state.
-pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_QueryShortChannelIdsDecodeErrorZ {
- CResult_QueryShortChannelIdsDecodeErrorZ {
- contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
+/// Creates a new CResult_InboundHTLCDetailsDecodeErrorZ in the error state.
+pub extern "C" fn CResult_InboundHTLCDetailsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_InboundHTLCDetailsDecodeErrorZ {
+ CResult_InboundHTLCDetailsDecodeErrorZ {
+ contents: CResult_InboundHTLCDetailsDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(o: &CResult_QueryShortChannelIdsDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_InboundHTLCDetailsDecodeErrorZ_is_ok(o: &CResult_InboundHTLCDetailsDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_QueryShortChannelIdsDecodeErrorZ.
-pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: CResult_QueryShortChannelIdsDecodeErrorZ) { }
-impl Drop for CResult_QueryShortChannelIdsDecodeErrorZ {
+/// Frees any resources used by the CResult_InboundHTLCDetailsDecodeErrorZ.
+pub extern "C" fn CResult_InboundHTLCDetailsDecodeErrorZ_free(_res: CResult_InboundHTLCDetailsDecodeErrorZ) { }
+impl Drop for CResult_InboundHTLCDetailsDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::QueryShortChannelIds, crate::lightning::ln::msgs::DecodeError>> for CResult_QueryShortChannelIdsDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::QueryShortChannelIds, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channel_state::InboundHTLCDetails, crate::lightning::ln::msgs::DecodeError>> for CResult_InboundHTLCDetailsDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channel_state::InboundHTLCDetails, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_QueryShortChannelIdsDecodeErrorZPtr { result }
+ CResult_InboundHTLCDetailsDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_QueryShortChannelIdsDecodeErrorZPtr { err }
+ CResult_InboundHTLCDetailsDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_QueryShortChannelIdsDecodeErrorZ {
+impl Clone for CResult_InboundHTLCDetailsDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::QueryShortChannelIds>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_InboundHTLCDetailsDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channel_state::InboundHTLCDetails>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_QueryShortChannelIdsDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_InboundHTLCDetailsDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_QueryShortChannelIdsDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_InboundHTLCDetailsDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: &CResult_QueryShortChannelIdsDecodeErrorZ) -> CResult_QueryShortChannelIdsDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_InboundHTLCDetailsDecodeErrorZ_clone(orig: &CResult_InboundHTLCDetailsDecodeErrorZ) -> CResult_InboundHTLCDetailsDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ReplyShortChannelIdsEndDecodeErrorZ
-pub union CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::ln::channel_state::OutboundHTLCStateDetails or not
+pub enum COption_OutboundHTLCStateDetailsZ {
+ /// When we're in this state, this COption_OutboundHTLCStateDetailsZ contains a crate::lightning::ln::channel_state::OutboundHTLCStateDetails
+ Some(crate::lightning::ln::channel_state::OutboundHTLCStateDetails),
+ /// When we're in this state, this COption_OutboundHTLCStateDetailsZ contains nothing
+ None
+}
+impl COption_OutboundHTLCStateDetailsZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::ln::channel_state::OutboundHTLCStateDetails {
+ if let Self::Some(v) = self { v } else { unreachable!() }
+ }
+}
+#[no_mangle]
+/// Constructs a new COption_OutboundHTLCStateDetailsZ containing a crate::lightning::ln::channel_state::OutboundHTLCStateDetails
+pub extern "C" fn COption_OutboundHTLCStateDetailsZ_some(o: crate::lightning::ln::channel_state::OutboundHTLCStateDetails) -> COption_OutboundHTLCStateDetailsZ {
+ COption_OutboundHTLCStateDetailsZ::Some(o)
+}
+#[no_mangle]
+/// Constructs a new COption_OutboundHTLCStateDetailsZ containing nothing
+pub extern "C" fn COption_OutboundHTLCStateDetailsZ_none() -> COption_OutboundHTLCStateDetailsZ {
+ COption_OutboundHTLCStateDetailsZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the crate::lightning::ln::channel_state::OutboundHTLCStateDetails, if we are in the Some state
+pub extern "C" fn COption_OutboundHTLCStateDetailsZ_free(_res: COption_OutboundHTLCStateDetailsZ) { }
+#[no_mangle]
+/// Creates a new COption_OutboundHTLCStateDetailsZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_OutboundHTLCStateDetailsZ_clone(orig: &COption_OutboundHTLCStateDetailsZ) -> COption_OutboundHTLCStateDetailsZ { Clone::clone(&orig) }
+#[repr(C)]
+/// The contents of CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ
+pub union CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ReplyShortChannelIdsEnd,
+ pub result: *mut crate::c_types::derived::COption_OutboundHTLCStateDetailsZ,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ReplyShortChannelIdsEndDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ReplyShortChannelIdsEnd on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::c_types::derived::COption_OutboundHTLCStateDetailsZ on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ReplyShortChannelIdsEndDecodeErrorZ {
- /// The contents of this CResult_ReplyShortChannelIdsEndDecodeErrorZ, accessible via either
+pub struct CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ {
+ /// The contents of this CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr,
- /// Whether this CResult_ReplyShortChannelIdsEndDecodeErrorZ represents a success state.
+ pub contents: CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZPtr,
+ /// Whether this CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ReplyShortChannelIdsEnd) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ {
- CResult_ReplyShortChannelIdsEndDecodeErrorZ {
- contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
+/// Creates a new CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ in the success state.
+pub extern "C" fn CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ_ok(o: crate::c_types::derived::COption_OutboundHTLCStateDetailsZ) -> CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ {
+ CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ {
+ contents: CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ {
- CResult_ReplyShortChannelIdsEndDecodeErrorZ {
- contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
+/// Creates a new CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ in the error state.
+pub extern "C" fn CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ {
+ CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ {
+ contents: CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(o: &CResult_ReplyShortChannelIdsEndDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ_is_ok(o: &CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ReplyShortChannelIdsEndDecodeErrorZ.
-pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: CResult_ReplyShortChannelIdsEndDecodeErrorZ) { }
-impl Drop for CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+/// Frees any resources used by the CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ.
+pub extern "C" fn CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ_free(_res: CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ) { }
+impl Drop for CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ReplyShortChannelIdsEnd, crate::lightning::ln::msgs::DecodeError>> for CResult_ReplyShortChannelIdsEndDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ReplyShortChannelIdsEnd, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::c_types::derived::COption_OutboundHTLCStateDetailsZ, crate::lightning::ln::msgs::DecodeError>> for CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::c_types::derived::COption_OutboundHTLCStateDetailsZ, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ReplyShortChannelIdsEndDecodeErrorZPtr { result }
+ CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ReplyShortChannelIdsEndDecodeErrorZPtr { err }
+ CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ReplyShortChannelIdsEndDecodeErrorZ {
+impl Clone for CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ReplyShortChannelIdsEnd>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::c_types::derived::COption_OutboundHTLCStateDetailsZ>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ReplyShortChannelIdsEndDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: &CResult_ReplyShortChannelIdsEndDecodeErrorZ) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ_clone(orig: &CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ) -> CResult_COption_OutboundHTLCStateDetailsZDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_QueryChannelRangeDecodeErrorZ
-pub union CResult_QueryChannelRangeDecodeErrorZPtr {
+/// The contents of CResult_OutboundHTLCDetailsDecodeErrorZ
+pub union CResult_OutboundHTLCDetailsDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::QueryChannelRange,
+ pub result: *mut crate::lightning::ln::channel_state::OutboundHTLCDetails,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_QueryChannelRangeDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::QueryChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_OutboundHTLCDetailsDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channel_state::OutboundHTLCDetails on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_QueryChannelRangeDecodeErrorZ {
- /// The contents of this CResult_QueryChannelRangeDecodeErrorZ, accessible via either
+pub struct CResult_OutboundHTLCDetailsDecodeErrorZ {
+ /// The contents of this CResult_OutboundHTLCDetailsDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_QueryChannelRangeDecodeErrorZPtr,
- /// Whether this CResult_QueryChannelRangeDecodeErrorZ represents a success state.
+ pub contents: CResult_OutboundHTLCDetailsDecodeErrorZPtr,
+ /// Whether this CResult_OutboundHTLCDetailsDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state.
-pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_ok(o: crate::lightning::ln::msgs::QueryChannelRange) -> CResult_QueryChannelRangeDecodeErrorZ {
- CResult_QueryChannelRangeDecodeErrorZ {
- contents: CResult_QueryChannelRangeDecodeErrorZPtr {
+/// Creates a new CResult_OutboundHTLCDetailsDecodeErrorZ in the success state.
+pub extern "C" fn CResult_OutboundHTLCDetailsDecodeErrorZ_ok(o: crate::lightning::ln::channel_state::OutboundHTLCDetails) -> CResult_OutboundHTLCDetailsDecodeErrorZ {
+ CResult_OutboundHTLCDetailsDecodeErrorZ {
+ contents: CResult_OutboundHTLCDetailsDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state.
-pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_QueryChannelRangeDecodeErrorZ {
- CResult_QueryChannelRangeDecodeErrorZ {
- contents: CResult_QueryChannelRangeDecodeErrorZPtr {
+/// Creates a new CResult_OutboundHTLCDetailsDecodeErrorZ in the error state.
+pub extern "C" fn CResult_OutboundHTLCDetailsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_OutboundHTLCDetailsDecodeErrorZ {
+ CResult_OutboundHTLCDetailsDecodeErrorZ {
+ contents: CResult_OutboundHTLCDetailsDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_is_ok(o: &CResult_QueryChannelRangeDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_OutboundHTLCDetailsDecodeErrorZ_is_ok(o: &CResult_OutboundHTLCDetailsDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_QueryChannelRangeDecodeErrorZ.
-pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_free(_res: CResult_QueryChannelRangeDecodeErrorZ) { }
-impl Drop for CResult_QueryChannelRangeDecodeErrorZ {
+/// Frees any resources used by the CResult_OutboundHTLCDetailsDecodeErrorZ.
+pub extern "C" fn CResult_OutboundHTLCDetailsDecodeErrorZ_free(_res: CResult_OutboundHTLCDetailsDecodeErrorZ) { }
+impl Drop for CResult_OutboundHTLCDetailsDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::QueryChannelRange, crate::lightning::ln::msgs::DecodeError>> for CResult_QueryChannelRangeDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::QueryChannelRange, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channel_state::OutboundHTLCDetails, crate::lightning::ln::msgs::DecodeError>> for CResult_OutboundHTLCDetailsDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channel_state::OutboundHTLCDetails, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_QueryChannelRangeDecodeErrorZPtr { result }
+ CResult_OutboundHTLCDetailsDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_QueryChannelRangeDecodeErrorZPtr { err }
+ CResult_OutboundHTLCDetailsDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_QueryChannelRangeDecodeErrorZ {
+impl Clone for CResult_OutboundHTLCDetailsDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_QueryChannelRangeDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::QueryChannelRange>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_OutboundHTLCDetailsDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channel_state::OutboundHTLCDetails>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_QueryChannelRangeDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_OutboundHTLCDetailsDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_OutboundHTLCDetailsDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_QueryChannelRangeDecodeErrorZ_clone(orig: &CResult_QueryChannelRangeDecodeErrorZ) -> CResult_QueryChannelRangeDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_OutboundHTLCDetailsDecodeErrorZ_clone(orig: &CResult_OutboundHTLCDetailsDecodeErrorZ) -> CResult_OutboundHTLCDetailsDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_ReplyChannelRangeDecodeErrorZ
-pub union CResult_ReplyChannelRangeDecodeErrorZPtr {
+/// The contents of CResult_CounterpartyForwardingInfoDecodeErrorZ
+pub union CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::ReplyChannelRange,
+ pub result: *mut crate::lightning::ln::channel_state::CounterpartyForwardingInfo,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_ReplyChannelRangeDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::ReplyChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_CounterpartyForwardingInfoDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channel_state::CounterpartyForwardingInfo on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_ReplyChannelRangeDecodeErrorZ {
- /// The contents of this CResult_ReplyChannelRangeDecodeErrorZ, accessible via either
+pub struct CResult_CounterpartyForwardingInfoDecodeErrorZ {
+ /// The contents of this CResult_CounterpartyForwardingInfoDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_ReplyChannelRangeDecodeErrorZPtr,
- /// Whether this CResult_ReplyChannelRangeDecodeErrorZ represents a success state.
+ pub contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr,
+ /// Whether this CResult_CounterpartyForwardingInfoDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state.
-pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_ok(o: crate::lightning::ln::msgs::ReplyChannelRange) -> CResult_ReplyChannelRangeDecodeErrorZ {
- CResult_ReplyChannelRangeDecodeErrorZ {
- contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
+/// Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the success state.
+pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_ok(o: crate::lightning::ln::channel_state::CounterpartyForwardingInfo) -> CResult_CounterpartyForwardingInfoDecodeErrorZ {
+ CResult_CounterpartyForwardingInfoDecodeErrorZ {
+ contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state.
-pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ReplyChannelRangeDecodeErrorZ {
- CResult_ReplyChannelRangeDecodeErrorZ {
- contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
+/// Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ in the error state.
+pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_CounterpartyForwardingInfoDecodeErrorZ {
+ CResult_CounterpartyForwardingInfoDecodeErrorZ {
+ contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_is_ok(o: &CResult_ReplyChannelRangeDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_is_ok(o: &CResult_CounterpartyForwardingInfoDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_ReplyChannelRangeDecodeErrorZ.
-pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_free(_res: CResult_ReplyChannelRangeDecodeErrorZ) { }
-impl Drop for CResult_ReplyChannelRangeDecodeErrorZ {
+/// Frees any resources used by the CResult_CounterpartyForwardingInfoDecodeErrorZ.
+pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_free(_res: CResult_CounterpartyForwardingInfoDecodeErrorZ) { }
+impl Drop for CResult_CounterpartyForwardingInfoDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::ReplyChannelRange, crate::lightning::ln::msgs::DecodeError>> for CResult_ReplyChannelRangeDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::ReplyChannelRange, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channel_state::CounterpartyForwardingInfo, crate::lightning::ln::msgs::DecodeError>> for CResult_CounterpartyForwardingInfoDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channel_state::CounterpartyForwardingInfo, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_ReplyChannelRangeDecodeErrorZPtr { result }
+ CResult_CounterpartyForwardingInfoDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_ReplyChannelRangeDecodeErrorZPtr { err }
+ CResult_CounterpartyForwardingInfoDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_ReplyChannelRangeDecodeErrorZ {
+impl Clone for CResult_CounterpartyForwardingInfoDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::ReplyChannelRange>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channel_state::CounterpartyForwardingInfo>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_ReplyChannelRangeDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_CounterpartyForwardingInfoDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_ReplyChannelRangeDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_CounterpartyForwardingInfoDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: &CResult_ReplyChannelRangeDecodeErrorZ) -> CResult_ReplyChannelRangeDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_CounterpartyForwardingInfoDecodeErrorZ_clone(orig: &CResult_CounterpartyForwardingInfoDecodeErrorZ) -> CResult_CounterpartyForwardingInfoDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// The contents of CResult_GossipTimestampFilterDecodeErrorZ
-pub union CResult_GossipTimestampFilterDecodeErrorZPtr {
+/// The contents of CResult_ChannelCounterpartyDecodeErrorZ
+pub union CResult_ChannelCounterpartyDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning::ln::msgs::GossipTimestampFilter,
+ pub result: *mut crate::lightning::ln::channel_state::ChannelCounterparty,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_GossipTimestampFilterDecodeErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning::ln::msgs::GossipTimestampFilter on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// A CResult_ChannelCounterpartyDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channel_state::ChannelCounterparty on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_GossipTimestampFilterDecodeErrorZ {
- /// The contents of this CResult_GossipTimestampFilterDecodeErrorZ, accessible via either
+pub struct CResult_ChannelCounterpartyDecodeErrorZ {
+ /// The contents of this CResult_ChannelCounterpartyDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_GossipTimestampFilterDecodeErrorZPtr,
- /// Whether this CResult_GossipTimestampFilterDecodeErrorZ represents a success state.
+ pub contents: CResult_ChannelCounterpartyDecodeErrorZPtr,
+ /// Whether this CResult_ChannelCounterpartyDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state.
-pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_ok(o: crate::lightning::ln::msgs::GossipTimestampFilter) -> CResult_GossipTimestampFilterDecodeErrorZ {
- CResult_GossipTimestampFilterDecodeErrorZ {
- contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
+/// Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_ok(o: crate::lightning::ln::channel_state::ChannelCounterparty) -> CResult_ChannelCounterpartyDecodeErrorZ {
+ CResult_ChannelCounterpartyDecodeErrorZ {
+ contents: CResult_ChannelCounterpartyDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
-#[no_mangle]
-/// Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state.
-pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_GossipTimestampFilterDecodeErrorZ {
- CResult_GossipTimestampFilterDecodeErrorZ {
- contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
+#[no_mangle]
+/// Creates a new CResult_ChannelCounterpartyDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelCounterpartyDecodeErrorZ {
+ CResult_ChannelCounterpartyDecodeErrorZ {
+ contents: CResult_ChannelCounterpartyDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_is_ok(o: &CResult_GossipTimestampFilterDecodeErrorZ) -> bool {
+pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_is_ok(o: &CResult_ChannelCounterpartyDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_GossipTimestampFilterDecodeErrorZ.
-pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_free(_res: CResult_GossipTimestampFilterDecodeErrorZ) { }
-impl Drop for CResult_GossipTimestampFilterDecodeErrorZ {
+/// Frees any resources used by the CResult_ChannelCounterpartyDecodeErrorZ.
+pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_free(_res: CResult_ChannelCounterpartyDecodeErrorZ) { }
+impl Drop for CResult_ChannelCounterpartyDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning::ln::msgs::GossipTimestampFilter, crate::lightning::ln::msgs::DecodeError>> for CResult_GossipTimestampFilterDecodeErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::msgs::GossipTimestampFilter, crate::lightning::ln::msgs::DecodeError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channel_state::ChannelCounterparty, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelCounterpartyDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channel_state::ChannelCounterparty, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_GossipTimestampFilterDecodeErrorZPtr { result }
+ CResult_ChannelCounterpartyDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_GossipTimestampFilterDecodeErrorZPtr { err }
+ CResult_ChannelCounterpartyDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_GossipTimestampFilterDecodeErrorZ {
+impl Clone for CResult_ChannelCounterpartyDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning::ln::msgs::GossipTimestampFilter>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ChannelCounterpartyDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channel_state::ChannelCounterparty>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_GossipTimestampFilterDecodeErrorZPtr {
+ Self { result_ok: false, contents: CResult_ChannelCounterpartyDecodeErrorZPtr {
err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_GossipTimestampFilterDecodeErrorZ which has the same data as `orig`
+/// Creates a new CResult_ChannelCounterpartyDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: &CResult_GossipTimestampFilterDecodeErrorZ) -> CResult_GossipTimestampFilterDecodeErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ChannelCounterpartyDecodeErrorZ_clone(orig: &CResult_ChannelCounterpartyDecodeErrorZ) -> CResult_ChannelCounterpartyDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
-/// A dynamically-allocated array of crate::lightning::ln::channelmanager::PhantomRouteHintss of arbitrary size.
+#[derive(Clone)]
+/// An enum which can either contain a crate::lightning::ln::channel_state::ChannelShutdownState or not
+pub enum COption_ChannelShutdownStateZ {
+ /// When we're in this state, this COption_ChannelShutdownStateZ contains a crate::lightning::ln::channel_state::ChannelShutdownState
+ Some(crate::lightning::ln::channel_state::ChannelShutdownState),
+ /// When we're in this state, this COption_ChannelShutdownStateZ contains nothing
+ None
+}
+impl COption_ChannelShutdownStateZ {
+ #[allow(unused)] pub(crate) fn is_some(&self) -> bool {
+ if let Self::None = self { false } else { true }
+ }
+ #[allow(unused)] pub(crate) fn is_none(&self) -> bool {
+ !self.is_some()
+ }
+ #[allow(unused)] pub(crate) fn take(mut self) -> crate::lightning::ln::channel_state::ChannelShutdownState {
+ if let Self::Some(v) = self { v } else { unreachable!() }
+ }
+}
+#[no_mangle]
+/// Constructs a new COption_ChannelShutdownStateZ containing a crate::lightning::ln::channel_state::ChannelShutdownState
+pub extern "C" fn COption_ChannelShutdownStateZ_some(o: crate::lightning::ln::channel_state::ChannelShutdownState) -> COption_ChannelShutdownStateZ {
+ COption_ChannelShutdownStateZ::Some(o)
+}
+#[no_mangle]
+/// Constructs a new COption_ChannelShutdownStateZ containing nothing
+pub extern "C" fn COption_ChannelShutdownStateZ_none() -> COption_ChannelShutdownStateZ {
+ COption_ChannelShutdownStateZ::None
+}
+#[no_mangle]
+/// Frees any resources associated with the crate::lightning::ln::channel_state::ChannelShutdownState, if we are in the Some state
+pub extern "C" fn COption_ChannelShutdownStateZ_free(_res: COption_ChannelShutdownStateZ) { }
+#[no_mangle]
+/// Creates a new COption_ChannelShutdownStateZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn COption_ChannelShutdownStateZ_clone(orig: &COption_ChannelShutdownStateZ) -> COption_ChannelShutdownStateZ { Clone::clone(&orig) }
+#[repr(C)]
+/// A dynamically-allocated array of crate::lightning::ln::channel_state::InboundHTLCDetailss of arbitrary size.
/// This corresponds to std::vector in C++
-pub struct CVec_PhantomRouteHintsZ {
+pub struct CVec_InboundHTLCDetailsZ {
/// The elements in the array.
/// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
- pub data: *mut crate::lightning::ln::channelmanager::PhantomRouteHints,
+ pub data: *mut crate::lightning::ln::channel_state::InboundHTLCDetails,
/// The number of elements pointed to by `data`.
pub datalen: usize
}
-impl CVec_PhantomRouteHintsZ {
- #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::channelmanager::PhantomRouteHints> {
+impl CVec_InboundHTLCDetailsZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::channel_state::InboundHTLCDetails> {
if self.datalen == 0 { return Vec::new(); }
let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
self.data = core::ptr::null_mut();
self.datalen = 0;
ret
}
- #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::channelmanager::PhantomRouteHints] {
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::channel_state::InboundHTLCDetails] {
unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
}
}
-impl From<Vec<crate::lightning::ln::channelmanager::PhantomRouteHints>> for CVec_PhantomRouteHintsZ {
- fn from(v: Vec<crate::lightning::ln::channelmanager::PhantomRouteHints>) -> Self {
+impl From<Vec<crate::lightning::ln::channel_state::InboundHTLCDetails>> for CVec_InboundHTLCDetailsZ {
+ fn from(v: Vec<crate::lightning::ln::channel_state::InboundHTLCDetails>) -> Self {
let datalen = v.len();
let data = Box::into_raw(v.into_boxed_slice());
Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
}
#[no_mangle]
/// Frees the buffer pointed to by `data` if `datalen` is non-0.
-pub extern "C" fn CVec_PhantomRouteHintsZ_free(_res: CVec_PhantomRouteHintsZ) { }
-impl Drop for CVec_PhantomRouteHintsZ {
+pub extern "C" fn CVec_InboundHTLCDetailsZ_free(_res: CVec_InboundHTLCDetailsZ) { }
+impl Drop for CVec_InboundHTLCDetailsZ {
fn drop(&mut self) {
if self.datalen == 0 { return; }
let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
}
}
-impl Clone for CVec_PhantomRouteHintsZ {
+impl Clone for CVec_InboundHTLCDetailsZ {
fn clone(&self) -> Self {
let mut res = Vec::new();
if self.datalen == 0 { return Self::from(res); }
}
}
#[repr(C)]
-/// The contents of CResult_Bolt11InvoiceSignOrCreationErrorZ
-pub union CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
+/// A dynamically-allocated array of crate::lightning::ln::channel_state::OutboundHTLCDetailss of arbitrary size.
+/// This corresponds to std::vector in C++
+pub struct CVec_OutboundHTLCDetailsZ {
+ /// The elements in the array.
+ /// If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ pub data: *mut crate::lightning::ln::channel_state::OutboundHTLCDetails,
+ /// The number of elements pointed to by `data`.
+ pub datalen: usize
+}
+impl CVec_OutboundHTLCDetailsZ {
+ #[allow(unused)] pub(crate) fn into_rust(&mut self) -> Vec<crate::lightning::ln::channel_state::OutboundHTLCDetails> {
+ if self.datalen == 0 { return Vec::new(); }
+ let ret = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) }.into();
+ self.data = core::ptr::null_mut();
+ self.datalen = 0;
+ ret
+ }
+ #[allow(unused)] pub(crate) fn as_slice(&self) -> &[crate::lightning::ln::channel_state::OutboundHTLCDetails] {
+ unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) }
+ }
+}
+impl From<Vec<crate::lightning::ln::channel_state::OutboundHTLCDetails>> for CVec_OutboundHTLCDetailsZ {
+ fn from(v: Vec<crate::lightning::ln::channel_state::OutboundHTLCDetails>) -> Self {
+ let datalen = v.len();
+ let data = Box::into_raw(v.into_boxed_slice());
+ Self { datalen, data: unsafe { (*data).as_mut_ptr() } }
+ }
+}
+#[no_mangle]
+/// Frees the buffer pointed to by `data` if `datalen` is non-0.
+pub extern "C" fn CVec_OutboundHTLCDetailsZ_free(_res: CVec_OutboundHTLCDetailsZ) { }
+impl Drop for CVec_OutboundHTLCDetailsZ {
+ fn drop(&mut self) {
+ if self.datalen == 0 { return; }
+ let _ = unsafe { Box::from_raw(core::slice::from_raw_parts_mut(self.data, self.datalen)) };
+ }
+}
+impl Clone for CVec_OutboundHTLCDetailsZ {
+ fn clone(&self) -> Self {
+ let mut res = Vec::new();
+ if self.datalen == 0 { return Self::from(res); }
+ res.extend_from_slice(unsafe { core::slice::from_raw_parts_mut(self.data, self.datalen) });
+ Self::from(res)
+ }
+}
+#[repr(C)]
+/// The contents of CResult_ChannelDetailsDecodeErrorZ
+pub union CResult_ChannelDetailsDecodeErrorZPtr {
/// A pointer to the contents in the success state.
/// Reading from this pointer when `result_ok` is not set is undefined.
- pub result: *mut crate::lightning_invoice::Bolt11Invoice,
+ pub result: *mut crate::lightning::ln::channel_state::ChannelDetails,
/// A pointer to the contents in the error state.
/// Reading from this pointer when `result_ok` is set is undefined.
- pub err: *mut crate::lightning_invoice::SignOrCreationError,
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
}
#[repr(C)]
-/// A CResult_Bolt11InvoiceSignOrCreationErrorZ represents the result of a fallible operation,
-/// containing a crate::lightning_invoice::Bolt11Invoice on success and a crate::lightning_invoice::SignOrCreationError on failure.
+/// A CResult_ChannelDetailsDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channel_state::ChannelDetails on success and a crate::lightning::ln::msgs::DecodeError on failure.
/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
-pub struct CResult_Bolt11InvoiceSignOrCreationErrorZ {
- /// The contents of this CResult_Bolt11InvoiceSignOrCreationErrorZ, accessible via either
+pub struct CResult_ChannelDetailsDecodeErrorZ {
+ /// The contents of this CResult_ChannelDetailsDecodeErrorZ, accessible via either
/// `err` or `result` depending on the state of `result_ok`.
- pub contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr,
- /// Whether this CResult_Bolt11InvoiceSignOrCreationErrorZ represents a success state.
+ pub contents: CResult_ChannelDetailsDecodeErrorZPtr,
+ /// Whether this CResult_ChannelDetailsDecodeErrorZ represents a success state.
pub result_ok: bool,
}
#[no_mangle]
-/// Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the success state.
-pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_ok(o: crate::lightning_invoice::Bolt11Invoice) -> CResult_Bolt11InvoiceSignOrCreationErrorZ {
- CResult_Bolt11InvoiceSignOrCreationErrorZ {
- contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
+/// Creates a new CResult_ChannelDetailsDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_ok(o: crate::lightning::ln::channel_state::ChannelDetails) -> CResult_ChannelDetailsDecodeErrorZ {
+ CResult_ChannelDetailsDecodeErrorZ {
+ contents: CResult_ChannelDetailsDecodeErrorZPtr {
result: Box::into_raw(Box::new(o)),
},
result_ok: true,
}
}
#[no_mangle]
-/// Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ in the error state.
-pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_err(e: crate::lightning_invoice::SignOrCreationError) -> CResult_Bolt11InvoiceSignOrCreationErrorZ {
- CResult_Bolt11InvoiceSignOrCreationErrorZ {
- contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
+/// Creates a new CResult_ChannelDetailsDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelDetailsDecodeErrorZ {
+ CResult_ChannelDetailsDecodeErrorZ {
+ contents: CResult_ChannelDetailsDecodeErrorZPtr {
err: Box::into_raw(Box::new(e)),
},
result_ok: false,
}
/// Checks if the given object is currently in the success state
#[no_mangle]
-pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_is_ok(o: &CResult_Bolt11InvoiceSignOrCreationErrorZ) -> bool {
+pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_is_ok(o: &CResult_ChannelDetailsDecodeErrorZ) -> bool {
o.result_ok
}
#[no_mangle]
-/// Frees any resources used by the CResult_Bolt11InvoiceSignOrCreationErrorZ.
-pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_free(_res: CResult_Bolt11InvoiceSignOrCreationErrorZ) { }
-impl Drop for CResult_Bolt11InvoiceSignOrCreationErrorZ {
+/// Frees any resources used by the CResult_ChannelDetailsDecodeErrorZ.
+pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_free(_res: CResult_ChannelDetailsDecodeErrorZ) { }
+impl Drop for CResult_ChannelDetailsDecodeErrorZ {
fn drop(&mut self) {
if self.result_ok {
if unsafe { !(self.contents.result as *mut ()).is_null() } {
}
}
}
-impl From<crate::c_types::CResultTempl<crate::lightning_invoice::Bolt11Invoice, crate::lightning_invoice::SignOrCreationError>> for CResult_Bolt11InvoiceSignOrCreationErrorZ {
- fn from(mut o: crate::c_types::CResultTempl<crate::lightning_invoice::Bolt11Invoice, crate::lightning_invoice::SignOrCreationError>) -> Self {
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channel_state::ChannelDetails, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelDetailsDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channel_state::ChannelDetails, crate::lightning::ln::msgs::DecodeError>) -> Self {
let contents = if o.result_ok {
let result = unsafe { o.contents.result };
unsafe { o.contents.result = core::ptr::null_mut() };
- CResult_Bolt11InvoiceSignOrCreationErrorZPtr { result }
+ CResult_ChannelDetailsDecodeErrorZPtr { result }
} else {
let err = unsafe { o.contents.err };
unsafe { o.contents.err = core::ptr::null_mut(); }
- CResult_Bolt11InvoiceSignOrCreationErrorZPtr { err }
+ CResult_ChannelDetailsDecodeErrorZPtr { err }
};
Self {
contents,
}
}
}
-impl Clone for CResult_Bolt11InvoiceSignOrCreationErrorZ {
+impl Clone for CResult_ChannelDetailsDecodeErrorZ {
fn clone(&self) -> Self {
if self.result_ok {
- Self { result_ok: true, contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
- result: Box::into_raw(Box::new(<crate::lightning_invoice::Bolt11Invoice>::clone(unsafe { &*self.contents.result })))
+ Self { result_ok: true, contents: CResult_ChannelDetailsDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channel_state::ChannelDetails>::clone(unsafe { &*self.contents.result })))
} }
} else {
- Self { result_ok: false, contents: CResult_Bolt11InvoiceSignOrCreationErrorZPtr {
- err: Box::into_raw(Box::new(<crate::lightning_invoice::SignOrCreationError>::clone(unsafe { &*self.contents.err })))
+ Self { result_ok: false, contents: CResult_ChannelDetailsDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
} }
}
}
}
#[no_mangle]
-/// Creates a new CResult_Bolt11InvoiceSignOrCreationErrorZ which has the same data as `orig`
+/// Creates a new CResult_ChannelDetailsDecodeErrorZ which has the same data as `orig`
/// but with all dynamically-allocated buffers duplicated in new buffers.
-pub extern "C" fn CResult_Bolt11InvoiceSignOrCreationErrorZ_clone(orig: &CResult_Bolt11InvoiceSignOrCreationErrorZ) -> CResult_Bolt11InvoiceSignOrCreationErrorZ { Clone::clone(&orig) }
+pub extern "C" fn CResult_ChannelDetailsDecodeErrorZ_clone(orig: &CResult_ChannelDetailsDecodeErrorZ) -> CResult_ChannelDetailsDecodeErrorZ { Clone::clone(&orig) }
+#[repr(C)]
+/// The contents of CResult_ChannelShutdownStateDecodeErrorZ
+pub union CResult_ChannelShutdownStateDecodeErrorZPtr {
+ /// A pointer to the contents in the success state.
+ /// Reading from this pointer when `result_ok` is not set is undefined.
+ pub result: *mut crate::lightning::ln::channel_state::ChannelShutdownState,
+ /// A pointer to the contents in the error state.
+ /// Reading from this pointer when `result_ok` is set is undefined.
+ pub err: *mut crate::lightning::ln::msgs::DecodeError,
+}
+#[repr(C)]
+/// A CResult_ChannelShutdownStateDecodeErrorZ represents the result of a fallible operation,
+/// containing a crate::lightning::ln::channel_state::ChannelShutdownState on success and a crate::lightning::ln::msgs::DecodeError on failure.
+/// `result_ok` indicates the overall state, and the contents are provided via `contents`.
+pub struct CResult_ChannelShutdownStateDecodeErrorZ {
+ /// The contents of this CResult_ChannelShutdownStateDecodeErrorZ, accessible via either
+ /// `err` or `result` depending on the state of `result_ok`.
+ pub contents: CResult_ChannelShutdownStateDecodeErrorZPtr,
+ /// Whether this CResult_ChannelShutdownStateDecodeErrorZ represents a success state.
+ pub result_ok: bool,
+}
+#[no_mangle]
+/// Creates a new CResult_ChannelShutdownStateDecodeErrorZ in the success state.
+pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_ok(o: crate::lightning::ln::channel_state::ChannelShutdownState) -> CResult_ChannelShutdownStateDecodeErrorZ {
+ CResult_ChannelShutdownStateDecodeErrorZ {
+ contents: CResult_ChannelShutdownStateDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(o)),
+ },
+ result_ok: true,
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_ChannelShutdownStateDecodeErrorZ in the error state.
+pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_err(e: crate::lightning::ln::msgs::DecodeError) -> CResult_ChannelShutdownStateDecodeErrorZ {
+ CResult_ChannelShutdownStateDecodeErrorZ {
+ contents: CResult_ChannelShutdownStateDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(e)),
+ },
+ result_ok: false,
+ }
+}
+/// Checks if the given object is currently in the success state
+#[no_mangle]
+pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_is_ok(o: &CResult_ChannelShutdownStateDecodeErrorZ) -> bool {
+ o.result_ok
+}
+#[no_mangle]
+/// Frees any resources used by the CResult_ChannelShutdownStateDecodeErrorZ.
+pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_free(_res: CResult_ChannelShutdownStateDecodeErrorZ) { }
+impl Drop for CResult_ChannelShutdownStateDecodeErrorZ {
+ fn drop(&mut self) {
+ if self.result_ok {
+ if unsafe { !(self.contents.result as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.result) };
+ }
+ } else {
+ if unsafe { !(self.contents.err as *mut ()).is_null() } {
+ let _ = unsafe { Box::from_raw(self.contents.err) };
+ }
+ }
+ }
+}
+impl From<crate::c_types::CResultTempl<crate::lightning::ln::channel_state::ChannelShutdownState, crate::lightning::ln::msgs::DecodeError>> for CResult_ChannelShutdownStateDecodeErrorZ {
+ fn from(mut o: crate::c_types::CResultTempl<crate::lightning::ln::channel_state::ChannelShutdownState, crate::lightning::ln::msgs::DecodeError>) -> Self {
+ let contents = if o.result_ok {
+ let result = unsafe { o.contents.result };
+ unsafe { o.contents.result = core::ptr::null_mut() };
+ CResult_ChannelShutdownStateDecodeErrorZPtr { result }
+ } else {
+ let err = unsafe { o.contents.err };
+ unsafe { o.contents.err = core::ptr::null_mut(); }
+ CResult_ChannelShutdownStateDecodeErrorZPtr { err }
+ };
+ Self {
+ contents,
+ result_ok: o.result_ok,
+ }
+ }
+}
+impl Clone for CResult_ChannelShutdownStateDecodeErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_ChannelShutdownStateDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::lightning::ln::channel_state::ChannelShutdownState>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_ChannelShutdownStateDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::lightning::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
+#[no_mangle]
+/// Creates a new CResult_ChannelShutdownStateDecodeErrorZ which has the same data as `orig`
+/// but with all dynamically-allocated buffers duplicated in new buffers.
+pub extern "C" fn CResult_ChannelShutdownStateDecodeErrorZ_clone(orig: &CResult_ChannelShutdownStateDecodeErrorZ) -> CResult_ChannelShutdownStateDecodeErrorZ { Clone::clone(&orig) }
#[repr(C)]
/// A dynamically-allocated array of crate::lightning::util::wakers::Futures of arbitrary size.
/// This corresponds to std::vector in C++