use std::str::FromStr;
use std::ffi::c_void;
+use core::convert::Infallible;
use bitcoin::hashes::Hash;
use crate::c_types::*;
use std::str::FromStr;
use std::ffi::c_void;
+use core::convert::Infallible;
use bitcoin::hashes::Hash;
use crate::c_types::*;
}
use lightning::ln::features::InitFeatures as nativeInitFeaturesImport;
-type nativeInitFeatures = nativeInitFeaturesImport;
+pub(crate) type nativeInitFeatures = nativeInitFeaturesImport;
/// Features used within an `init` message.
#[must_use]
pub extern "C" fn InitFeatures_free(this_obj: InitFeatures) { }
#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
-extern "C" fn InitFeatures_free_void(this_ptr: *mut c_void) {
+pub(crate) extern "C" fn InitFeatures_free_void(this_ptr: *mut c_void) {
unsafe { let _ = Box::from_raw(this_ptr as *mut nativeInitFeatures); }
}
#[allow(unused)]
}
use lightning::ln::features::NodeFeatures as nativeNodeFeaturesImport;
-type nativeNodeFeatures = nativeNodeFeaturesImport;
+pub(crate) type nativeNodeFeatures = nativeNodeFeaturesImport;
/// Features used within a `node_announcement` message.
#[must_use]
pub extern "C" fn NodeFeatures_free(this_obj: NodeFeatures) { }
#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
-extern "C" fn NodeFeatures_free_void(this_ptr: *mut c_void) {
+pub(crate) extern "C" fn NodeFeatures_free_void(this_ptr: *mut c_void) {
unsafe { let _ = Box::from_raw(this_ptr as *mut nativeNodeFeatures); }
}
#[allow(unused)]
}
use lightning::ln::features::ChannelFeatures as nativeChannelFeaturesImport;
-type nativeChannelFeatures = nativeChannelFeaturesImport;
+pub(crate) type nativeChannelFeatures = nativeChannelFeaturesImport;
/// Features used within a `channel_announcement` message.
#[must_use]
pub extern "C" fn ChannelFeatures_free(this_obj: ChannelFeatures) { }
#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
-extern "C" fn ChannelFeatures_free_void(this_ptr: *mut c_void) {
+pub(crate) extern "C" fn ChannelFeatures_free_void(this_ptr: *mut c_void) {
unsafe { let _ = Box::from_raw(this_ptr as *mut nativeChannelFeatures); }
}
#[allow(unused)]
}
use lightning::ln::features::InvoiceFeatures as nativeInvoiceFeaturesImport;
-type nativeInvoiceFeatures = nativeInvoiceFeaturesImport;
+pub(crate) type nativeInvoiceFeatures = nativeInvoiceFeaturesImport;
/// Features used within an invoice.
#[must_use]
pub extern "C" fn InvoiceFeatures_free(this_obj: InvoiceFeatures) { }
#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
-extern "C" fn InvoiceFeatures_free_void(this_ptr: *mut c_void) {
+pub(crate) extern "C" fn InvoiceFeatures_free_void(this_ptr: *mut c_void) {
unsafe { let _ = Box::from_raw(this_ptr as *mut nativeInvoiceFeatures); }
}
#[allow(unused)]
InitFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
}
+/// Returns true if this `Features` object contains unknown feature flags which are set as
+/// \"required\".
+#[must_use]
+#[no_mangle]
+pub extern "C" fn InitFeatures_requires_unknown_bits(this_arg: &InitFeatures) -> bool {
+ let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
+ ret
+}
+
/// Create a blank Features with no features set
#[must_use]
#[no_mangle]
NodeFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
}
+/// Returns true if this `Features` object contains unknown feature flags which are set as
+/// \"required\".
+#[must_use]
+#[no_mangle]
+pub extern "C" fn NodeFeatures_requires_unknown_bits(this_arg: &NodeFeatures) -> bool {
+ let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
+ ret
+}
+
/// Create a blank Features with no features set
#[must_use]
#[no_mangle]
ChannelFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
}
+/// Returns true if this `Features` object contains unknown feature flags which are set as
+/// \"required\".
+#[must_use]
+#[no_mangle]
+pub extern "C" fn ChannelFeatures_requires_unknown_bits(this_arg: &ChannelFeatures) -> bool {
+ let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
+ ret
+}
+
/// Create a blank Features with no features set
#[must_use]
#[no_mangle]
InvoiceFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
}
+/// Returns true if this `Features` object contains unknown feature flags which are set as
+/// \"required\".
+#[must_use]
+#[no_mangle]
+pub extern "C" fn InvoiceFeatures_requires_unknown_bits(this_arg: &InvoiceFeatures) -> bool {
+ let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
+ ret
+}
+
/// Returns whether the `payment_secret` feature is supported.
#[must_use]
#[no_mangle]