+#[must_use]
+#[no_mangle]
+pub extern "C" fn RouteHop_new(mut pubkey_arg: crate::c_types::PublicKey, mut node_features_arg: crate::ln::features::NodeFeatures, mut short_channel_id_arg: u64, mut channel_features_arg: crate::ln::features::ChannelFeatures, mut fee_msat_arg: u64, mut cltv_expiry_delta_arg: u32) -> RouteHop {
+ RouteHop { inner: Box::into_raw(Box::new(nativeRouteHop {
+ pubkey: pubkey_arg.into_rust(),
+ node_features: *unsafe { Box::from_raw(node_features_arg.take_inner()) },
+ short_channel_id: short_channel_id_arg,
+ channel_features: *unsafe { Box::from_raw(channel_features_arg.take_inner()) },
+ fee_msat: fee_msat_arg,
+ cltv_expiry_delta: cltv_expiry_delta_arg,
+ })), is_owned: true }
+}
+impl Clone for RouteHop {
+ 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 RouteHop_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeRouteHop)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn RouteHop_clone(orig: &RouteHop) -> RouteHop {
+ orig.clone()
+}