void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
+struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
+
struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
+struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
+
struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
void Init_free(struct LDKInit this_ptr);
+/**
+ * The relevant features which the sender supports
+ */
+struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
+
+/**
+ * The relevant features which the sender supports
+ */
+void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
+
+MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
+
struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
void ErrorMessage_free(struct LDKErrorMessage this_ptr);
void NetworkGraph_free(struct LDKNetworkGraph this_ptr);
+struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
+
void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_ptr);
void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_ptr);
*/
void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
+struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
+
struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
}
}
}
+impl Clone for CResult_ChannelInfoDecodeErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_ChannelInfoDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::routing::network_graph::ChannelInfo>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_ChannelInfoDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
+#[no_mangle]
+pub extern "C" fn CResult_ChannelInfoDecodeErrorZ_clone(orig: &CResult_ChannelInfoDecodeErrorZ) -> CResult_ChannelInfoDecodeErrorZ { orig.clone() }
#[repr(C)]
pub union CResult_RoutingFeesDecodeErrorZPtr {
pub result: *mut crate::routing::network_graph::RoutingFees,
}
}
}
+impl Clone for CResult_NetworkGraphDecodeErrorZ {
+ fn clone(&self) -> Self {
+ if self.result_ok {
+ Self { result_ok: true, contents: CResult_NetworkGraphDecodeErrorZPtr {
+ result: Box::into_raw(Box::new(<crate::routing::network_graph::NetworkGraph>::clone(unsafe { &*self.contents.result })))
+ } }
+ } else {
+ Self { result_ok: false, contents: CResult_NetworkGraphDecodeErrorZPtr {
+ err: Box::into_raw(Box::new(<crate::ln::msgs::DecodeError>::clone(unsafe { &*self.contents.err })))
+ } }
+ }
+ }
+}
+#[no_mangle]
+pub extern "C" fn CResult_NetworkGraphDecodeErrorZ_clone(orig: &CResult_NetworkGraphDecodeErrorZ) -> CResult_NetworkGraphDecodeErrorZ { orig.clone() }
#[repr(C)]
pub struct C2Tuple_usizeTransactionZ {
pub a: usize,
ret
}
}
+/// The relevant features which the sender supports
+#[no_mangle]
+pub extern "C" fn Init_get_features(this_ptr: &Init) -> crate::ln::features::InitFeatures {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.features;
+ crate::ln::features::InitFeatures { inner: unsafe { ( (&((*inner_val)) as *const _) as *mut _) }, is_owned: false }
+}
+/// The relevant features which the sender supports
+#[no_mangle]
+pub extern "C" fn Init_set_features(this_ptr: &mut Init, mut val: crate::ln::features::InitFeatures) {
+ unsafe { &mut *this_ptr.inner }.features = *unsafe { Box::from_raw(val.take_inner()) };
+}
+#[must_use]
+#[no_mangle]
+pub extern "C" fn Init_new(mut features_arg: crate::ln::features::InitFeatures) -> Init {
+ Init { inner: Box::into_raw(Box::new(nativeInit {
+ features: *unsafe { Box::from_raw(features_arg.take_inner()) },
+ })), is_owned: true }
+}
impl Clone for Init {
fn clone(&self) -> Self {
Self {
ret
}
}
+impl Clone for NetworkGraph {
+ fn clone(&self) -> Self {
+ Self {
+ inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
+ is_owned: true,
+ }
+ }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn NetworkGraph_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeNetworkGraph)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn NetworkGraph_clone(orig: &NetworkGraph) -> NetworkGraph {
+ orig.clone()
+}
use lightning::routing::network_graph::LockedNetworkGraph as nativeLockedNetworkGraphImport;
type nativeLockedNetworkGraph = nativeLockedNetworkGraphImport<'static>;
let mut local_val = if val.inner.is_null() { None } else { Some( { *unsafe { Box::from_raw(val.take_inner()) } }) };
unsafe { &mut *this_ptr.inner }.announcement_message = local_val;
}
+impl Clone for ChannelInfo {
+ fn clone(&self) -> Self {
+ Self {
+ inner: if self.inner.is_null() { std::ptr::null_mut() } else {
+ Box::into_raw(Box::new(unsafe { &*self.inner }.clone())) },
+ is_owned: true,
+ }
+ }
+}
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+pub(crate) extern "C" fn ChannelInfo_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeChannelInfo)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn ChannelInfo_clone(orig: &ChannelInfo) -> ChannelInfo {
+ orig.clone()
+}
#[no_mangle]
pub extern "C" fn ChannelInfo_write(obj: &ChannelInfo) -> crate::c_types::derived::CVec_u8Z {
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })