+/// The minimum HTLC size incoming to sender, in milli-satoshi
+#[no_mangle]
+pub extern "C" fn UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: &UnsignedChannelUpdate) -> u64 {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.htlc_minimum_msat;
+ (*inner_val)
+}
+/// The minimum HTLC size incoming to sender, in milli-satoshi
+#[no_mangle]
+pub extern "C" fn UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: &mut UnsignedChannelUpdate, mut val: u64) {
+ unsafe { &mut *this_ptr.inner }.htlc_minimum_msat = val;
+}
+/// The base HTLC fee charged by sender, in milli-satoshi
+#[no_mangle]
+pub extern "C" fn UnsignedChannelUpdate_get_fee_base_msat(this_ptr: &UnsignedChannelUpdate) -> u32 {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.fee_base_msat;
+ (*inner_val)
+}
+/// The base HTLC fee charged by sender, in milli-satoshi
+#[no_mangle]
+pub extern "C" fn UnsignedChannelUpdate_set_fee_base_msat(this_ptr: &mut UnsignedChannelUpdate, mut val: u32) {
+ unsafe { &mut *this_ptr.inner }.fee_base_msat = val;
+}
+/// The amount to fee multiplier, in micro-satoshi
+#[no_mangle]
+pub extern "C" fn UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: &UnsignedChannelUpdate) -> u32 {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.fee_proportional_millionths;
+ (*inner_val)
+}
+/// The amount to fee multiplier, in micro-satoshi
+#[no_mangle]
+pub extern "C" fn UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: &mut UnsignedChannelUpdate, mut val: u32) {
+ unsafe { &mut *this_ptr.inner }.fee_proportional_millionths = val;
+}
+impl Clone for UnsignedChannelUpdate {
+ 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 UnsignedChannelUpdate_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeUnsignedChannelUpdate)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn UnsignedChannelUpdate_clone(orig: &UnsignedChannelUpdate) -> UnsignedChannelUpdate {
+ orig.clone()
+}
+
+use lightning::ln::msgs::ChannelUpdate as nativeChannelUpdateImport;
+type nativeChannelUpdate = nativeChannelUpdateImport;
+
+/// A channel_update message to be sent or received from a peer
+#[must_use]
+#[repr(C)]
+pub struct ChannelUpdate {
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeChannelUpdate,
+ pub is_owned: bool,
+}
+
+impl Drop for ChannelUpdate {
+ fn drop(&mut self) {
+ if self.is_owned && !self.inner.is_null() {
+ let _ = unsafe { Box::from_raw(self.inner) };
+ }
+ }
+}
+#[no_mangle]
+pub extern "C" fn ChannelUpdate_free(this_ptr: ChannelUpdate) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+extern "C" fn ChannelUpdate_free_void(this_ptr: *mut c_void) {
+ unsafe { let _ = Box::from_raw(this_ptr as *mut nativeChannelUpdate); }
+}
+#[allow(unused)]
+/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+impl ChannelUpdate {
+ pub(crate) fn take_inner(mut self) -> *mut nativeChannelUpdate {
+ assert!(self.is_owned);
+ let ret = self.inner;
+ self.inner = std::ptr::null_mut();
+ ret
+ }
+}
+/// A signature of the channel update
+#[no_mangle]
+pub extern "C" fn ChannelUpdate_get_signature(this_ptr: &ChannelUpdate) -> crate::c_types::Signature {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.signature;
+ crate::c_types::Signature::from_rust(&(*inner_val))
+}
+/// A signature of the channel update
+#[no_mangle]
+pub extern "C" fn ChannelUpdate_set_signature(this_ptr: &mut ChannelUpdate, mut val: crate::c_types::Signature) {
+ unsafe { &mut *this_ptr.inner }.signature = val.into_rust();
+}
+/// The actual channel update
+#[no_mangle]
+pub extern "C" fn ChannelUpdate_get_contents(this_ptr: &ChannelUpdate) -> crate::ln::msgs::UnsignedChannelUpdate {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.contents;
+ crate::ln::msgs::UnsignedChannelUpdate { inner: unsafe { ( (&((*inner_val)) as *const _) as *mut _) }, is_owned: false }
+}
+/// The actual channel update
+#[no_mangle]
+pub extern "C" fn ChannelUpdate_set_contents(this_ptr: &mut ChannelUpdate, mut val: crate::ln::msgs::UnsignedChannelUpdate) {
+ unsafe { &mut *this_ptr.inner }.contents = *unsafe { Box::from_raw(val.take_inner()) };
+}
+#[must_use]
+#[no_mangle]
+pub extern "C" fn ChannelUpdate_new(mut signature_arg: crate::c_types::Signature, mut contents_arg: crate::ln::msgs::UnsignedChannelUpdate) -> ChannelUpdate {
+ ChannelUpdate { inner: Box::into_raw(Box::new(nativeChannelUpdate {
+ signature: signature_arg.into_rust(),
+ contents: *unsafe { Box::from_raw(contents_arg.take_inner()) },
+ })), is_owned: true }
+}
+impl Clone for ChannelUpdate {
+ 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 ChannelUpdate_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeChannelUpdate)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn ChannelUpdate_clone(orig: &ChannelUpdate) -> ChannelUpdate {
+ orig.clone()
+}
+
+use lightning::ln::msgs::QueryChannelRange as nativeQueryChannelRangeImport;
+type nativeQueryChannelRange = nativeQueryChannelRangeImport;
+
+/// A query_channel_range message is used to query a peer for channel
+/// UTXOs in a range of blocks. The recipient of a query makes a best
+/// effort to reply to the query using one or more reply_channel_range
+/// messages.
+#[must_use]
+#[repr(C)]
+pub struct QueryChannelRange {
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeQueryChannelRange,
+ pub is_owned: bool,
+}
+
+impl Drop for QueryChannelRange {
+ fn drop(&mut self) {
+ if self.is_owned && !self.inner.is_null() {
+ let _ = unsafe { Box::from_raw(self.inner) };
+ }
+ }
+}
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_free(this_ptr: QueryChannelRange) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+extern "C" fn QueryChannelRange_free_void(this_ptr: *mut c_void) {
+ unsafe { let _ = Box::from_raw(this_ptr as *mut nativeQueryChannelRange); }
+}
+#[allow(unused)]
+/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+impl QueryChannelRange {
+ pub(crate) fn take_inner(mut self) -> *mut nativeQueryChannelRange {
+ assert!(self.is_owned);
+ let ret = self.inner;
+ self.inner = std::ptr::null_mut();
+ ret
+ }
+}
+/// The genesis hash of the blockchain being queried
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_get_chain_hash(this_ptr: &QueryChannelRange) -> *const [u8; 32] {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.chain_hash;
+ (*inner_val).as_inner()
+}
+/// The genesis hash of the blockchain being queried
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_set_chain_hash(this_ptr: &mut QueryChannelRange, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *this_ptr.inner }.chain_hash = ::bitcoin::hash_types::BlockHash::from_slice(&val.data[..]).unwrap();
+}
+/// The height of the first block for the channel UTXOs being queried
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_get_first_blocknum(this_ptr: &QueryChannelRange) -> u32 {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.first_blocknum;
+ (*inner_val)
+}
+/// The height of the first block for the channel UTXOs being queried
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_set_first_blocknum(this_ptr: &mut QueryChannelRange, mut val: u32) {
+ unsafe { &mut *this_ptr.inner }.first_blocknum = val;
+}
+/// The number of blocks to include in the query results
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_get_number_of_blocks(this_ptr: &QueryChannelRange) -> u32 {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.number_of_blocks;
+ (*inner_val)
+}
+/// The number of blocks to include in the query results
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_set_number_of_blocks(this_ptr: &mut QueryChannelRange, mut val: u32) {
+ unsafe { &mut *this_ptr.inner }.number_of_blocks = val;
+}
+#[must_use]
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_new(mut chain_hash_arg: crate::c_types::ThirtyTwoBytes, mut first_blocknum_arg: u32, mut number_of_blocks_arg: u32) -> QueryChannelRange {
+ QueryChannelRange { inner: Box::into_raw(Box::new(nativeQueryChannelRange {
+ chain_hash: ::bitcoin::hash_types::BlockHash::from_slice(&chain_hash_arg.data[..]).unwrap(),
+ first_blocknum: first_blocknum_arg,
+ number_of_blocks: number_of_blocks_arg,
+ })), is_owned: true }
+}
+impl Clone for QueryChannelRange {
+ 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 QueryChannelRange_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeQueryChannelRange)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn QueryChannelRange_clone(orig: &QueryChannelRange) -> QueryChannelRange {
+ orig.clone()
+}
+
+use lightning::ln::msgs::ReplyChannelRange as nativeReplyChannelRangeImport;
+type nativeReplyChannelRange = nativeReplyChannelRangeImport;
+
+/// A reply_channel_range message is a reply to a query_channel_range
+/// message. Multiple reply_channel_range messages can be sent in reply
+/// to a single query_channel_range message. The query recipient makes a
+/// best effort to respond based on their local network view which may
+/// not be a perfect view of the network. The short_channel_ids in the
+/// reply are encoded. We only support encoding_type=0 uncompressed
+/// serialization and do not support encoding_type=1 zlib serialization.
+#[must_use]
+#[repr(C)]
+pub struct ReplyChannelRange {
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeReplyChannelRange,
+ pub is_owned: bool,
+}
+
+impl Drop for ReplyChannelRange {
+ fn drop(&mut self) {
+ if self.is_owned && !self.inner.is_null() {
+ let _ = unsafe { Box::from_raw(self.inner) };
+ }
+ }
+}
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_free(this_ptr: ReplyChannelRange) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+extern "C" fn ReplyChannelRange_free_void(this_ptr: *mut c_void) {
+ unsafe { let _ = Box::from_raw(this_ptr as *mut nativeReplyChannelRange); }
+}
+#[allow(unused)]
+/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+impl ReplyChannelRange {
+ pub(crate) fn take_inner(mut self) -> *mut nativeReplyChannelRange {
+ assert!(self.is_owned);
+ let ret = self.inner;
+ self.inner = std::ptr::null_mut();
+ ret
+ }
+}
+/// The genesis hash of the blockchain being queried
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_get_chain_hash(this_ptr: &ReplyChannelRange) -> *const [u8; 32] {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.chain_hash;
+ (*inner_val).as_inner()
+}
+/// The genesis hash of the blockchain being queried
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_set_chain_hash(this_ptr: &mut ReplyChannelRange, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *this_ptr.inner }.chain_hash = ::bitcoin::hash_types::BlockHash::from_slice(&val.data[..]).unwrap();
+}
+/// The height of the first block in the range of the reply
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_get_first_blocknum(this_ptr: &ReplyChannelRange) -> u32 {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.first_blocknum;
+ (*inner_val)
+}
+/// The height of the first block in the range of the reply
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_set_first_blocknum(this_ptr: &mut ReplyChannelRange, mut val: u32) {
+ unsafe { &mut *this_ptr.inner }.first_blocknum = val;
+}
+/// The number of blocks included in the range of the reply
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_get_number_of_blocks(this_ptr: &ReplyChannelRange) -> u32 {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.number_of_blocks;
+ (*inner_val)
+}
+/// The number of blocks included in the range of the reply
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_set_number_of_blocks(this_ptr: &mut ReplyChannelRange, mut val: u32) {
+ unsafe { &mut *this_ptr.inner }.number_of_blocks = val;
+}
+/// True when this is the final reply for a query
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_get_sync_complete(this_ptr: &ReplyChannelRange) -> bool {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.sync_complete;
+ (*inner_val)
+}
+/// True when this is the final reply for a query
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_set_sync_complete(this_ptr: &mut ReplyChannelRange, mut val: bool) {
+ unsafe { &mut *this_ptr.inner }.sync_complete = val;
+}
+/// The short_channel_ids in the channel range
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_set_short_channel_ids(this_ptr: &mut ReplyChannelRange, mut val: crate::c_types::derived::CVec_u64Z) {
+ let mut local_val = Vec::new(); for mut item in val.into_rust().drain(..) { local_val.push( { item }); };
+ unsafe { &mut *this_ptr.inner }.short_channel_ids = local_val;
+}
+#[must_use]
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_new(mut chain_hash_arg: crate::c_types::ThirtyTwoBytes, mut first_blocknum_arg: u32, mut number_of_blocks_arg: u32, mut sync_complete_arg: bool, mut short_channel_ids_arg: crate::c_types::derived::CVec_u64Z) -> ReplyChannelRange {
+ let mut local_short_channel_ids_arg = Vec::new(); for mut item in short_channel_ids_arg.into_rust().drain(..) { local_short_channel_ids_arg.push( { item }); };
+ ReplyChannelRange { inner: Box::into_raw(Box::new(nativeReplyChannelRange {
+ chain_hash: ::bitcoin::hash_types::BlockHash::from_slice(&chain_hash_arg.data[..]).unwrap(),
+ first_blocknum: first_blocknum_arg,
+ number_of_blocks: number_of_blocks_arg,
+ sync_complete: sync_complete_arg,
+ short_channel_ids: local_short_channel_ids_arg,
+ })), is_owned: true }
+}
+impl Clone for ReplyChannelRange {
+ 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 ReplyChannelRange_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeReplyChannelRange)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn ReplyChannelRange_clone(orig: &ReplyChannelRange) -> ReplyChannelRange {
+ orig.clone()
+}
+
+use lightning::ln::msgs::QueryShortChannelIds as nativeQueryShortChannelIdsImport;
+type nativeQueryShortChannelIds = nativeQueryShortChannelIdsImport;
+
+/// A query_short_channel_ids message is used to query a peer for
+/// routing gossip messages related to one or more short_channel_ids.
+/// The query recipient will reply with the latest, if available,
+/// channel_announcement, channel_update and node_announcement messages
+/// it maintains for the requested short_channel_ids followed by a
+/// reply_short_channel_ids_end message. The short_channel_ids sent in
+/// this query are encoded. We only support encoding_type=0 uncompressed
+/// serialization and do not support encoding_type=1 zlib serialization.
+#[must_use]
+#[repr(C)]
+pub struct QueryShortChannelIds {
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeQueryShortChannelIds,
+ pub is_owned: bool,
+}
+
+impl Drop for QueryShortChannelIds {
+ fn drop(&mut self) {
+ if self.is_owned && !self.inner.is_null() {
+ let _ = unsafe { Box::from_raw(self.inner) };
+ }
+ }
+}
+#[no_mangle]
+pub extern "C" fn QueryShortChannelIds_free(this_ptr: QueryShortChannelIds) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+extern "C" fn QueryShortChannelIds_free_void(this_ptr: *mut c_void) {
+ unsafe { let _ = Box::from_raw(this_ptr as *mut nativeQueryShortChannelIds); }
+}
+#[allow(unused)]
+/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+impl QueryShortChannelIds {
+ pub(crate) fn take_inner(mut self) -> *mut nativeQueryShortChannelIds {
+ assert!(self.is_owned);
+ let ret = self.inner;
+ self.inner = std::ptr::null_mut();
+ ret
+ }
+}
+/// The genesis hash of the blockchain being queried
+#[no_mangle]
+pub extern "C" fn QueryShortChannelIds_get_chain_hash(this_ptr: &QueryShortChannelIds) -> *const [u8; 32] {
+ let mut inner_val = &mut unsafe { &mut *this_ptr.inner }.chain_hash;
+ (*inner_val).as_inner()
+}
+/// The genesis hash of the blockchain being queried
+#[no_mangle]
+pub extern "C" fn QueryShortChannelIds_set_chain_hash(this_ptr: &mut QueryShortChannelIds, mut val: crate::c_types::ThirtyTwoBytes) {
+ unsafe { &mut *this_ptr.inner }.chain_hash = ::bitcoin::hash_types::BlockHash::from_slice(&val.data[..]).unwrap();
+}
+/// The short_channel_ids that are being queried
+#[no_mangle]
+pub extern "C" fn QueryShortChannelIds_set_short_channel_ids(this_ptr: &mut QueryShortChannelIds, mut val: crate::c_types::derived::CVec_u64Z) {
+ let mut local_val = Vec::new(); for mut item in val.into_rust().drain(..) { local_val.push( { item }); };
+ unsafe { &mut *this_ptr.inner }.short_channel_ids = local_val;
+}
+#[must_use]
+#[no_mangle]
+pub extern "C" fn QueryShortChannelIds_new(mut chain_hash_arg: crate::c_types::ThirtyTwoBytes, mut short_channel_ids_arg: crate::c_types::derived::CVec_u64Z) -> QueryShortChannelIds {
+ let mut local_short_channel_ids_arg = Vec::new(); for mut item in short_channel_ids_arg.into_rust().drain(..) { local_short_channel_ids_arg.push( { item }); };
+ QueryShortChannelIds { inner: Box::into_raw(Box::new(nativeQueryShortChannelIds {
+ chain_hash: ::bitcoin::hash_types::BlockHash::from_slice(&chain_hash_arg.data[..]).unwrap(),
+ short_channel_ids: local_short_channel_ids_arg,
+ })), is_owned: true }
+}
+impl Clone for QueryShortChannelIds {
+ 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 QueryShortChannelIds_clone_void(this_ptr: *const c_void) -> *mut c_void {
+ Box::into_raw(Box::new(unsafe { (*(this_ptr as *mut nativeQueryShortChannelIds)).clone() })) as *mut c_void
+}
+#[no_mangle]
+pub extern "C" fn QueryShortChannelIds_clone(orig: &QueryShortChannelIds) -> QueryShortChannelIds {
+ orig.clone()
+}
+
+use lightning::ln::msgs::ReplyShortChannelIdsEnd as nativeReplyShortChannelIdsEndImport;
+type nativeReplyShortChannelIdsEnd = nativeReplyShortChannelIdsEndImport;
+
+/// A reply_short_channel_ids_end message is sent as a reply to a
+/// query_short_channel_ids message. The query recipient makes a best
+/// effort to respond based on their local network view which may not be
+/// a perfect view of the network.
+#[must_use]
+#[repr(C)]
+pub struct ReplyShortChannelIdsEnd {
+ /// Nearly everywhere, inner must be non-null, however in places where
+ /// the Rust equivalent takes an Option, it may be set to null to indicate None.
+ pub inner: *mut nativeReplyShortChannelIdsEnd,
+ pub is_owned: bool,
+}
+
+impl Drop for ReplyShortChannelIdsEnd {
+ fn drop(&mut self) {
+ if self.is_owned && !self.inner.is_null() {
+ let _ = unsafe { Box::from_raw(self.inner) };
+ }
+ }
+}
+#[no_mangle]
+pub extern "C" fn ReplyShortChannelIdsEnd_free(this_ptr: ReplyShortChannelIdsEnd) { }
+#[allow(unused)]
+/// Used only if an object of this type is returned as a trait impl by a method
+extern "C" fn ReplyShortChannelIdsEnd_free_void(this_ptr: *mut c_void) {
+ unsafe { let _ = Box::from_raw(this_ptr as *mut nativeReplyShortChannelIdsEnd); }
+}
+#[allow(unused)]
+/// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
+impl ReplyShortChannelIdsEnd {
+ pub(crate) fn take_inner(mut self) -> *mut nativeReplyShortChannelIdsEnd {
+ assert!(self.is_owned);
+ let ret = self.inner;
+ self.inner = std::ptr::null_mut();
+ ret
+ }
+}
+/// The genesis hash of the blockchain that was queried