1 // This file is Copyright its original authors, visible in version control
2 // history and in the source files from which this was generated.
4 // This file is licensed under the license available in the LICENSE or LICENSE.md
5 // file in the root of this repository or, if no such file exists, the same
6 // license as that which applies to the original source files from which this
7 // source was automatically generated.
9 //! Feature flag definitions for the Lightning protocol according to [BOLT #9].
11 //! Lightning nodes advertise a supported set of operation through feature flags. Features are
12 //! applicable for a specific context as indicated in some [messages]. [`Features`] encapsulates
13 //! behavior for specifying and checking feature flags for a particular context. Each feature is
14 //! defined internally by a trait specifying the corresponding flags (i.e., even and odd bits).
16 //! Whether a feature is considered \"known\" or \"unknown\" is relative to the implementation, whereas
17 //! the term \"supports\" is used in reference to a particular set of [`Features`]. That is, a node
18 //! supports a feature if it advertises the feature (as either required or optional) to its peers.
19 //! And the implementation can interpret a feature if the feature is known to it.
21 //! The following features are currently required in the LDK:
22 //! - `VariableLengthOnion` - requires/supports variable-length routing onion payloads
23 //! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md) for more information).
24 //! - `StaticRemoteKey` - requires/supports static key for remote output
25 //! (see [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md) for more information).
27 //! The following features are currently supported in the LDK:
28 //! - `DataLossProtect` - requires/supports that a node which has somehow fallen behind, e.g., has been restored from an old backup,
29 //! can detect that it has fallen behind
30 //! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
31 //! - `InitialRoutingSync` - requires/supports that the sending node needs a complete routing information dump
32 //! (see [BOLT-7](https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#initial-sync) for more information).
33 //! - `UpfrontShutdownScript` - commits to a shutdown scriptpubkey when opening a channel
34 //! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message) for more information).
35 //! - `GossipQueries` - requires/supports more sophisticated gossip control
36 //! (see [BOLT-7](https://github.com/lightning/bolts/blob/master/07-routing-gossip.md) for more information).
37 //! - `PaymentSecret` - requires/supports that a node supports payment_secret field
38 //! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md) for more information).
39 //! - `BasicMPP` - requires/supports that a node can receive basic multi-part payments
40 //! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md#basic-multi-part-payments) for more information).
41 //! - `Wumbo` - requires/supports that a node create large channels. Called `option_support_large_channel` in the spec.
42 //! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-open_channel-message) for more information).
43 //! - `AnchorsZeroFeeHtlcTx` - requires/supports that commitment transactions include anchor outputs
44 //! and HTLC transactions are pre-signed with zero fee (see
45 //! [BOLT-3](https://github.com/lightning/bolts/blob/master/03-transactions.md) for more
47 //! - `RouteBlinding` - requires/supports that a node can relay payments over blinded paths
48 //! (see [BOLT-4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md#route-blinding) for more information).
49 //! - `ShutdownAnySegwit` - requires/supports that future segwit versions are allowed in `shutdown`
50 //! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
51 //! - `OnionMessages` - requires/supports forwarding onion messages
52 //! (see [BOLT-7](https://github.com/lightning/bolts/pull/759/files) for more information).
53 //! - `ChannelType` - node supports the channel_type field in open/accept
54 //! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
55 //! - `SCIDPrivacy` - supply channel aliases for routing
56 //! (see [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md) for more information).
57 //! - `PaymentMetadata` - include additional data in invoices which is passed to recipients in the
59 //! (see [BOLT-11](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md) for
61 //! - `ZeroConf` - supports accepting HTLCs and using channels prior to funding confirmation
63 //! [BOLT-2](https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#the-channel_ready-message)
65 //! - `Keysend` - send funds to a node without an invoice
66 //! (see the [`Keysend` feature assignment proposal](https://github.com/lightning/bolts/issues/605#issuecomment-606679798) for more information).
67 //! - `Trampoline` - supports receiving and forwarding Trampoline payments
68 //! (see the [`Trampoline` feature proposal](https://github.com/lightning/bolts/pull/836) for more information).
70 //! LDK knows about the following features, but does not support them:
71 //! - `AnchorsNonzeroFeeHtlcTx` - the initial version of anchor outputs, which was later found to be
72 //! vulnerable (see this
73 //! [mailing list post](https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-September/002796.html)
74 //! for more information).
76 //! [BOLT #9]: https://github.com/lightning/bolts/blob/master/09-features.md
77 //! [messages]: crate::ln::msgs
79 use alloc::str::FromStr;
80 use alloc::string::String;
81 use core::ffi::c_void;
82 use core::convert::Infallible;
83 use bitcoin::hashes::Hash;
84 use crate::c_types::*;
85 #[cfg(feature="no-std")]
86 use alloc::{vec::Vec, boxed::Box};
90 use alloc::str::FromStr;
91 use alloc::string::String;
92 use core::ffi::c_void;
93 use core::convert::Infallible;
94 use bitcoin::hashes::Hash;
95 use crate::c_types::*;
96 #[cfg(feature="no-std")]
97 use alloc::{vec::Vec, boxed::Box};
99 /// Set this feature as optional.
101 pub extern "C" fn InitFeatures_set_data_loss_protect_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
102 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_data_loss_protect_optional()
105 /// Set this feature as required.
107 pub extern "C" fn InitFeatures_set_data_loss_protect_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
108 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_data_loss_protect_required()
111 /// Checks if this feature is supported.
114 pub extern "C" fn InitFeatures_supports_data_loss_protect(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
115 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_data_loss_protect();
119 /// Set this feature as optional.
121 pub extern "C" fn NodeFeatures_set_data_loss_protect_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
122 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_data_loss_protect_optional()
125 /// Set this feature as required.
127 pub extern "C" fn NodeFeatures_set_data_loss_protect_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
128 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_data_loss_protect_required()
131 /// Checks if this feature is supported.
134 pub extern "C" fn NodeFeatures_supports_data_loss_protect(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
135 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_data_loss_protect();
139 /// Checks if this feature is required.
142 pub extern "C" fn InitFeatures_requires_data_loss_protect(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
143 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_data_loss_protect();
147 /// Checks if this feature is required.
150 pub extern "C" fn NodeFeatures_requires_data_loss_protect(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
151 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_data_loss_protect();
155 /// Set this feature as optional.
157 pub extern "C" fn InitFeatures_set_initial_routing_sync_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
158 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_initial_routing_sync_optional()
161 /// Set this feature as required.
163 pub extern "C" fn InitFeatures_set_initial_routing_sync_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
164 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_initial_routing_sync_required()
167 /// Checks if this feature is supported.
170 pub extern "C" fn InitFeatures_initial_routing_sync(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
171 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.initial_routing_sync();
175 /// Set this feature as optional.
177 pub extern "C" fn InitFeatures_set_upfront_shutdown_script_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
178 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_upfront_shutdown_script_optional()
181 /// Set this feature as required.
183 pub extern "C" fn InitFeatures_set_upfront_shutdown_script_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
184 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_upfront_shutdown_script_required()
187 /// Checks if this feature is supported.
190 pub extern "C" fn InitFeatures_supports_upfront_shutdown_script(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
191 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_upfront_shutdown_script();
195 /// Set this feature as optional.
197 pub extern "C" fn NodeFeatures_set_upfront_shutdown_script_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
198 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_upfront_shutdown_script_optional()
201 /// Set this feature as required.
203 pub extern "C" fn NodeFeatures_set_upfront_shutdown_script_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
204 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_upfront_shutdown_script_required()
207 /// Checks if this feature is supported.
210 pub extern "C" fn NodeFeatures_supports_upfront_shutdown_script(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
211 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_upfront_shutdown_script();
215 /// Checks if this feature is required.
218 pub extern "C" fn InitFeatures_requires_upfront_shutdown_script(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
219 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_upfront_shutdown_script();
223 /// Checks if this feature is required.
226 pub extern "C" fn NodeFeatures_requires_upfront_shutdown_script(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
227 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_upfront_shutdown_script();
231 /// Set this feature as optional.
233 pub extern "C" fn InitFeatures_set_gossip_queries_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
234 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_gossip_queries_optional()
237 /// Set this feature as required.
239 pub extern "C" fn InitFeatures_set_gossip_queries_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
240 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_gossip_queries_required()
243 /// Checks if this feature is supported.
246 pub extern "C" fn InitFeatures_supports_gossip_queries(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
247 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_gossip_queries();
251 /// Set this feature as optional.
253 pub extern "C" fn NodeFeatures_set_gossip_queries_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
254 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_gossip_queries_optional()
257 /// Set this feature as required.
259 pub extern "C" fn NodeFeatures_set_gossip_queries_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
260 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_gossip_queries_required()
263 /// Checks if this feature is supported.
266 pub extern "C" fn NodeFeatures_supports_gossip_queries(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
267 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_gossip_queries();
271 /// Checks if this feature is required.
274 pub extern "C" fn InitFeatures_requires_gossip_queries(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
275 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_gossip_queries();
279 /// Checks if this feature is required.
282 pub extern "C" fn NodeFeatures_requires_gossip_queries(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
283 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_gossip_queries();
287 /// Set this feature as optional.
289 pub extern "C" fn InitFeatures_set_variable_length_onion_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
290 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_variable_length_onion_optional()
293 /// Set this feature as required.
295 pub extern "C" fn InitFeatures_set_variable_length_onion_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
296 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_variable_length_onion_required()
299 /// Checks if this feature is supported.
302 pub extern "C" fn InitFeatures_supports_variable_length_onion(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
303 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_variable_length_onion();
307 /// Set this feature as optional.
309 pub extern "C" fn NodeFeatures_set_variable_length_onion_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
310 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_variable_length_onion_optional()
313 /// Set this feature as required.
315 pub extern "C" fn NodeFeatures_set_variable_length_onion_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
316 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_variable_length_onion_required()
319 /// Checks if this feature is supported.
322 pub extern "C" fn NodeFeatures_supports_variable_length_onion(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
323 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_variable_length_onion();
327 /// Set this feature as optional.
329 pub extern "C" fn Bolt11InvoiceFeatures_set_variable_length_onion_optional(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
330 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_variable_length_onion_optional()
333 /// Set this feature as required.
335 pub extern "C" fn Bolt11InvoiceFeatures_set_variable_length_onion_required(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
336 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_variable_length_onion_required()
339 /// Checks if this feature is supported.
342 pub extern "C" fn Bolt11InvoiceFeatures_supports_variable_length_onion(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
343 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_variable_length_onion();
347 /// Checks if this feature is required.
350 pub extern "C" fn InitFeatures_requires_variable_length_onion(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
351 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_variable_length_onion();
355 /// Checks if this feature is required.
358 pub extern "C" fn NodeFeatures_requires_variable_length_onion(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
359 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_variable_length_onion();
363 /// Checks if this feature is required.
366 pub extern "C" fn Bolt11InvoiceFeatures_requires_variable_length_onion(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
367 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_variable_length_onion();
371 /// Set this feature as optional.
373 pub extern "C" fn InitFeatures_set_static_remote_key_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
374 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_static_remote_key_optional()
377 /// Set this feature as required.
379 pub extern "C" fn InitFeatures_set_static_remote_key_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
380 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_static_remote_key_required()
383 /// Checks if this feature is supported.
386 pub extern "C" fn InitFeatures_supports_static_remote_key(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
387 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_static_remote_key();
391 /// Set this feature as optional.
393 pub extern "C" fn NodeFeatures_set_static_remote_key_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
394 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_static_remote_key_optional()
397 /// Set this feature as required.
399 pub extern "C" fn NodeFeatures_set_static_remote_key_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
400 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_static_remote_key_required()
403 /// Checks if this feature is supported.
406 pub extern "C" fn NodeFeatures_supports_static_remote_key(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
407 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_static_remote_key();
411 /// Set this feature as optional.
413 pub extern "C" fn ChannelTypeFeatures_set_static_remote_key_optional(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
414 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_static_remote_key_optional()
417 /// Set this feature as required.
419 pub extern "C" fn ChannelTypeFeatures_set_static_remote_key_required(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
420 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_static_remote_key_required()
423 /// Checks if this feature is supported.
426 pub extern "C" fn ChannelTypeFeatures_supports_static_remote_key(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
427 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_static_remote_key();
431 /// Checks if this feature is required.
434 pub extern "C" fn InitFeatures_requires_static_remote_key(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
435 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_static_remote_key();
439 /// Checks if this feature is required.
442 pub extern "C" fn NodeFeatures_requires_static_remote_key(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
443 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_static_remote_key();
447 /// Checks if this feature is required.
450 pub extern "C" fn ChannelTypeFeatures_requires_static_remote_key(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
451 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_static_remote_key();
455 /// Set this feature as optional.
457 pub extern "C" fn InitFeatures_set_payment_secret_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
458 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_payment_secret_optional()
461 /// Set this feature as required.
463 pub extern "C" fn InitFeatures_set_payment_secret_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
464 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_payment_secret_required()
467 /// Checks if this feature is supported.
470 pub extern "C" fn InitFeatures_supports_payment_secret(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
471 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_payment_secret();
475 /// Set this feature as optional.
477 pub extern "C" fn NodeFeatures_set_payment_secret_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
478 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_payment_secret_optional()
481 /// Set this feature as required.
483 pub extern "C" fn NodeFeatures_set_payment_secret_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
484 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_payment_secret_required()
487 /// Checks if this feature is supported.
490 pub extern "C" fn NodeFeatures_supports_payment_secret(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
491 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_payment_secret();
495 /// Set this feature as optional.
497 pub extern "C" fn Bolt11InvoiceFeatures_set_payment_secret_optional(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
498 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_payment_secret_optional()
501 /// Set this feature as required.
503 pub extern "C" fn Bolt11InvoiceFeatures_set_payment_secret_required(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
504 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_payment_secret_required()
507 /// Checks if this feature is supported.
510 pub extern "C" fn Bolt11InvoiceFeatures_supports_payment_secret(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
511 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_payment_secret();
515 /// Checks if this feature is required.
518 pub extern "C" fn InitFeatures_requires_payment_secret(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
519 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_payment_secret();
523 /// Checks if this feature is required.
526 pub extern "C" fn NodeFeatures_requires_payment_secret(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
527 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_payment_secret();
531 /// Checks if this feature is required.
534 pub extern "C" fn Bolt11InvoiceFeatures_requires_payment_secret(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
535 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_payment_secret();
539 /// Set this feature as optional.
541 pub extern "C" fn InitFeatures_set_basic_mpp_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
542 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_basic_mpp_optional()
545 /// Set this feature as required.
547 pub extern "C" fn InitFeatures_set_basic_mpp_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
548 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_basic_mpp_required()
551 /// Checks if this feature is supported.
554 pub extern "C" fn InitFeatures_supports_basic_mpp(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
555 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_basic_mpp();
559 /// Set this feature as optional.
561 pub extern "C" fn NodeFeatures_set_basic_mpp_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
562 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_basic_mpp_optional()
565 /// Set this feature as required.
567 pub extern "C" fn NodeFeatures_set_basic_mpp_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
568 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_basic_mpp_required()
571 /// Checks if this feature is supported.
574 pub extern "C" fn NodeFeatures_supports_basic_mpp(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
575 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_basic_mpp();
579 /// Set this feature as optional.
581 pub extern "C" fn Bolt11InvoiceFeatures_set_basic_mpp_optional(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
582 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_basic_mpp_optional()
585 /// Set this feature as required.
587 pub extern "C" fn Bolt11InvoiceFeatures_set_basic_mpp_required(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
588 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_basic_mpp_required()
591 /// Checks if this feature is supported.
594 pub extern "C" fn Bolt11InvoiceFeatures_supports_basic_mpp(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
595 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_basic_mpp();
599 /// Set this feature as optional.
601 pub extern "C" fn Bolt12InvoiceFeatures_set_basic_mpp_optional(this_arg: &mut crate::lightning::ln::features::Bolt12InvoiceFeatures) {
602 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt12InvoiceFeatures)) }.set_basic_mpp_optional()
605 /// Set this feature as required.
607 pub extern "C" fn Bolt12InvoiceFeatures_set_basic_mpp_required(this_arg: &mut crate::lightning::ln::features::Bolt12InvoiceFeatures) {
608 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt12InvoiceFeatures)) }.set_basic_mpp_required()
611 /// Checks if this feature is supported.
614 pub extern "C" fn Bolt12InvoiceFeatures_supports_basic_mpp(this_arg: &crate::lightning::ln::features::Bolt12InvoiceFeatures) -> bool {
615 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_basic_mpp();
619 /// Checks if this feature is required.
622 pub extern "C" fn InitFeatures_requires_basic_mpp(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
623 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_basic_mpp();
627 /// Checks if this feature is required.
630 pub extern "C" fn NodeFeatures_requires_basic_mpp(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
631 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_basic_mpp();
635 /// Checks if this feature is required.
638 pub extern "C" fn Bolt11InvoiceFeatures_requires_basic_mpp(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
639 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_basic_mpp();
643 /// Checks if this feature is required.
646 pub extern "C" fn Bolt12InvoiceFeatures_requires_basic_mpp(this_arg: &crate::lightning::ln::features::Bolt12InvoiceFeatures) -> bool {
647 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_basic_mpp();
651 /// Set this feature as optional.
653 pub extern "C" fn InitFeatures_set_wumbo_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
654 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_wumbo_optional()
657 /// Set this feature as required.
659 pub extern "C" fn InitFeatures_set_wumbo_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
660 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_wumbo_required()
663 /// Checks if this feature is supported.
666 pub extern "C" fn InitFeatures_supports_wumbo(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
667 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_wumbo();
671 /// Set this feature as optional.
673 pub extern "C" fn NodeFeatures_set_wumbo_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
674 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_wumbo_optional()
677 /// Set this feature as required.
679 pub extern "C" fn NodeFeatures_set_wumbo_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
680 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_wumbo_required()
683 /// Checks if this feature is supported.
686 pub extern "C" fn NodeFeatures_supports_wumbo(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
687 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_wumbo();
691 /// Checks if this feature is required.
694 pub extern "C" fn InitFeatures_requires_wumbo(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
695 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_wumbo();
699 /// Checks if this feature is required.
702 pub extern "C" fn NodeFeatures_requires_wumbo(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
703 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_wumbo();
707 /// Set this feature as optional.
709 pub extern "C" fn InitFeatures_set_anchors_nonzero_fee_htlc_tx_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
710 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_anchors_nonzero_fee_htlc_tx_optional()
713 /// Set this feature as required.
715 pub extern "C" fn InitFeatures_set_anchors_nonzero_fee_htlc_tx_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
716 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_anchors_nonzero_fee_htlc_tx_required()
719 /// Checks if this feature is supported.
722 pub extern "C" fn InitFeatures_supports_anchors_nonzero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
723 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_anchors_nonzero_fee_htlc_tx();
727 /// Set this feature as optional.
729 pub extern "C" fn NodeFeatures_set_anchors_nonzero_fee_htlc_tx_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
730 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_anchors_nonzero_fee_htlc_tx_optional()
733 /// Set this feature as required.
735 pub extern "C" fn NodeFeatures_set_anchors_nonzero_fee_htlc_tx_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
736 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_anchors_nonzero_fee_htlc_tx_required()
739 /// Checks if this feature is supported.
742 pub extern "C" fn NodeFeatures_supports_anchors_nonzero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
743 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_anchors_nonzero_fee_htlc_tx();
747 /// Set this feature as optional.
749 pub extern "C" fn ChannelTypeFeatures_set_anchors_nonzero_fee_htlc_tx_optional(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
750 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_anchors_nonzero_fee_htlc_tx_optional()
753 /// Set this feature as required.
755 pub extern "C" fn ChannelTypeFeatures_set_anchors_nonzero_fee_htlc_tx_required(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
756 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_anchors_nonzero_fee_htlc_tx_required()
759 /// Checks if this feature is supported.
762 pub extern "C" fn ChannelTypeFeatures_supports_anchors_nonzero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
763 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_anchors_nonzero_fee_htlc_tx();
767 /// Checks if this feature is required.
770 pub extern "C" fn InitFeatures_requires_anchors_nonzero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
771 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_anchors_nonzero_fee_htlc_tx();
775 /// Checks if this feature is required.
778 pub extern "C" fn NodeFeatures_requires_anchors_nonzero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
779 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_anchors_nonzero_fee_htlc_tx();
783 /// Checks if this feature is required.
786 pub extern "C" fn ChannelTypeFeatures_requires_anchors_nonzero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
787 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_anchors_nonzero_fee_htlc_tx();
791 /// Set this feature as optional.
793 pub extern "C" fn InitFeatures_set_anchors_zero_fee_htlc_tx_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
794 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_anchors_zero_fee_htlc_tx_optional()
797 /// Set this feature as required.
799 pub extern "C" fn InitFeatures_set_anchors_zero_fee_htlc_tx_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
800 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_anchors_zero_fee_htlc_tx_required()
803 /// Checks if this feature is supported.
806 pub extern "C" fn InitFeatures_supports_anchors_zero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
807 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_anchors_zero_fee_htlc_tx();
811 /// Set this feature as optional.
813 pub extern "C" fn NodeFeatures_set_anchors_zero_fee_htlc_tx_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
814 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_anchors_zero_fee_htlc_tx_optional()
817 /// Set this feature as required.
819 pub extern "C" fn NodeFeatures_set_anchors_zero_fee_htlc_tx_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
820 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_anchors_zero_fee_htlc_tx_required()
823 /// Checks if this feature is supported.
826 pub extern "C" fn NodeFeatures_supports_anchors_zero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
827 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_anchors_zero_fee_htlc_tx();
831 /// Set this feature as optional.
833 pub extern "C" fn ChannelTypeFeatures_set_anchors_zero_fee_htlc_tx_optional(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
834 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_anchors_zero_fee_htlc_tx_optional()
837 /// Set this feature as required.
839 pub extern "C" fn ChannelTypeFeatures_set_anchors_zero_fee_htlc_tx_required(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
840 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_anchors_zero_fee_htlc_tx_required()
843 /// Checks if this feature is supported.
846 pub extern "C" fn ChannelTypeFeatures_supports_anchors_zero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
847 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_anchors_zero_fee_htlc_tx();
851 /// Checks if this feature is required.
854 pub extern "C" fn InitFeatures_requires_anchors_zero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
855 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_anchors_zero_fee_htlc_tx();
859 /// Checks if this feature is required.
862 pub extern "C" fn NodeFeatures_requires_anchors_zero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
863 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_anchors_zero_fee_htlc_tx();
867 /// Checks if this feature is required.
870 pub extern "C" fn ChannelTypeFeatures_requires_anchors_zero_fee_htlc_tx(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
871 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_anchors_zero_fee_htlc_tx();
875 /// Set this feature as optional.
877 pub extern "C" fn InitFeatures_set_route_blinding_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
878 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_route_blinding_optional()
881 /// Set this feature as required.
883 pub extern "C" fn InitFeatures_set_route_blinding_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
884 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_route_blinding_required()
887 /// Checks if this feature is supported.
890 pub extern "C" fn InitFeatures_supports_route_blinding(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
891 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_route_blinding();
895 /// Set this feature as optional.
897 pub extern "C" fn NodeFeatures_set_route_blinding_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
898 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_route_blinding_optional()
901 /// Set this feature as required.
903 pub extern "C" fn NodeFeatures_set_route_blinding_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
904 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_route_blinding_required()
907 /// Checks if this feature is supported.
910 pub extern "C" fn NodeFeatures_supports_route_blinding(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
911 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_route_blinding();
915 /// Checks if this feature is required.
918 pub extern "C" fn InitFeatures_requires_route_blinding(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
919 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_route_blinding();
923 /// Checks if this feature is required.
926 pub extern "C" fn NodeFeatures_requires_route_blinding(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
927 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_route_blinding();
931 /// Set this feature as optional.
933 pub extern "C" fn InitFeatures_set_shutdown_any_segwit_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
934 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_shutdown_any_segwit_optional()
937 /// Set this feature as required.
939 pub extern "C" fn InitFeatures_set_shutdown_any_segwit_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
940 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_shutdown_any_segwit_required()
943 /// Checks if this feature is supported.
946 pub extern "C" fn InitFeatures_supports_shutdown_anysegwit(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
947 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_shutdown_anysegwit();
951 /// Set this feature as optional.
953 pub extern "C" fn NodeFeatures_set_shutdown_any_segwit_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
954 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_shutdown_any_segwit_optional()
957 /// Set this feature as required.
959 pub extern "C" fn NodeFeatures_set_shutdown_any_segwit_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
960 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_shutdown_any_segwit_required()
963 /// Checks if this feature is supported.
966 pub extern "C" fn NodeFeatures_supports_shutdown_anysegwit(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
967 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_shutdown_anysegwit();
971 /// Checks if this feature is required.
974 pub extern "C" fn InitFeatures_requires_shutdown_anysegwit(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
975 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_shutdown_anysegwit();
979 /// Checks if this feature is required.
982 pub extern "C" fn NodeFeatures_requires_shutdown_anysegwit(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
983 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_shutdown_anysegwit();
987 /// Set this feature as optional.
989 pub extern "C" fn InitFeatures_set_taproot_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
990 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_taproot_optional()
993 /// Set this feature as required.
995 pub extern "C" fn InitFeatures_set_taproot_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
996 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_taproot_required()
999 /// Checks if this feature is supported.
1002 pub extern "C" fn InitFeatures_supports_taproot(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1003 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_taproot();
1007 /// Set this feature as optional.
1009 pub extern "C" fn NodeFeatures_set_taproot_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1010 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_taproot_optional()
1013 /// Set this feature as required.
1015 pub extern "C" fn NodeFeatures_set_taproot_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1016 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_taproot_required()
1019 /// Checks if this feature is supported.
1022 pub extern "C" fn NodeFeatures_supports_taproot(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1023 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_taproot();
1027 /// Set this feature as optional.
1029 pub extern "C" fn ChannelTypeFeatures_set_taproot_optional(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
1030 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_taproot_optional()
1033 /// Set this feature as required.
1035 pub extern "C" fn ChannelTypeFeatures_set_taproot_required(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
1036 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_taproot_required()
1039 /// Checks if this feature is supported.
1042 pub extern "C" fn ChannelTypeFeatures_supports_taproot(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
1043 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_taproot();
1047 /// Checks if this feature is required.
1050 pub extern "C" fn InitFeatures_requires_taproot(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1051 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_taproot();
1055 /// Checks if this feature is required.
1058 pub extern "C" fn NodeFeatures_requires_taproot(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1059 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_taproot();
1063 /// Checks if this feature is required.
1066 pub extern "C" fn ChannelTypeFeatures_requires_taproot(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
1067 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_taproot();
1071 /// Set this feature as optional.
1073 pub extern "C" fn InitFeatures_set_onion_messages_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1074 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_onion_messages_optional()
1077 /// Set this feature as required.
1079 pub extern "C" fn InitFeatures_set_onion_messages_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1080 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_onion_messages_required()
1083 /// Checks if this feature is supported.
1086 pub extern "C" fn InitFeatures_supports_onion_messages(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1087 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_onion_messages();
1091 /// Set this feature as optional.
1093 pub extern "C" fn NodeFeatures_set_onion_messages_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1094 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_onion_messages_optional()
1097 /// Set this feature as required.
1099 pub extern "C" fn NodeFeatures_set_onion_messages_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1100 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_onion_messages_required()
1103 /// Checks if this feature is supported.
1106 pub extern "C" fn NodeFeatures_supports_onion_messages(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1107 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_onion_messages();
1111 /// Checks if this feature is required.
1114 pub extern "C" fn InitFeatures_requires_onion_messages(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1115 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_onion_messages();
1119 /// Checks if this feature is required.
1122 pub extern "C" fn NodeFeatures_requires_onion_messages(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1123 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_onion_messages();
1127 /// Set this feature as optional.
1129 pub extern "C" fn InitFeatures_set_channel_type_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1130 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_channel_type_optional()
1133 /// Set this feature as required.
1135 pub extern "C" fn InitFeatures_set_channel_type_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1136 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_channel_type_required()
1139 /// Checks if this feature is supported.
1142 pub extern "C" fn InitFeatures_supports_channel_type(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1143 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_channel_type();
1147 /// Set this feature as optional.
1149 pub extern "C" fn NodeFeatures_set_channel_type_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1150 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_channel_type_optional()
1153 /// Set this feature as required.
1155 pub extern "C" fn NodeFeatures_set_channel_type_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1156 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_channel_type_required()
1159 /// Checks if this feature is supported.
1162 pub extern "C" fn NodeFeatures_supports_channel_type(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1163 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_channel_type();
1167 /// Checks if this feature is required.
1170 pub extern "C" fn InitFeatures_requires_channel_type(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1171 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_channel_type();
1175 /// Checks if this feature is required.
1178 pub extern "C" fn NodeFeatures_requires_channel_type(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1179 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_channel_type();
1183 /// Set this feature as optional.
1185 pub extern "C" fn InitFeatures_set_scid_privacy_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1186 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_scid_privacy_optional()
1189 /// Set this feature as required.
1191 pub extern "C" fn InitFeatures_set_scid_privacy_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1192 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_scid_privacy_required()
1195 /// Checks if this feature is supported.
1198 pub extern "C" fn InitFeatures_supports_scid_privacy(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1199 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_scid_privacy();
1203 /// Set this feature as optional.
1205 pub extern "C" fn NodeFeatures_set_scid_privacy_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1206 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_scid_privacy_optional()
1209 /// Set this feature as required.
1211 pub extern "C" fn NodeFeatures_set_scid_privacy_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1212 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_scid_privacy_required()
1215 /// Checks if this feature is supported.
1218 pub extern "C" fn NodeFeatures_supports_scid_privacy(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1219 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_scid_privacy();
1223 /// Set this feature as optional.
1225 pub extern "C" fn ChannelTypeFeatures_set_scid_privacy_optional(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
1226 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_scid_privacy_optional()
1229 /// Set this feature as required.
1231 pub extern "C" fn ChannelTypeFeatures_set_scid_privacy_required(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
1232 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_scid_privacy_required()
1235 /// Checks if this feature is supported.
1238 pub extern "C" fn ChannelTypeFeatures_supports_scid_privacy(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
1239 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_scid_privacy();
1243 /// Checks if this feature is required.
1246 pub extern "C" fn InitFeatures_requires_scid_privacy(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1247 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_scid_privacy();
1251 /// Checks if this feature is required.
1254 pub extern "C" fn NodeFeatures_requires_scid_privacy(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1255 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_scid_privacy();
1259 /// Checks if this feature is required.
1262 pub extern "C" fn ChannelTypeFeatures_requires_scid_privacy(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
1263 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_scid_privacy();
1267 /// Set this feature as optional.
1269 pub extern "C" fn Bolt11InvoiceFeatures_set_payment_metadata_optional(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
1270 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_payment_metadata_optional()
1273 /// Set this feature as required.
1275 pub extern "C" fn Bolt11InvoiceFeatures_set_payment_metadata_required(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
1276 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_payment_metadata_required()
1279 /// Checks if this feature is supported.
1282 pub extern "C" fn Bolt11InvoiceFeatures_supports_payment_metadata(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
1283 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_payment_metadata();
1287 /// Checks if this feature is required.
1290 pub extern "C" fn Bolt11InvoiceFeatures_requires_payment_metadata(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
1291 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_payment_metadata();
1295 /// Set this feature as optional.
1297 pub extern "C" fn InitFeatures_set_zero_conf_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1298 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_zero_conf_optional()
1301 /// Set this feature as required.
1303 pub extern "C" fn InitFeatures_set_zero_conf_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1304 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_zero_conf_required()
1307 /// Checks if this feature is supported.
1310 pub extern "C" fn InitFeatures_supports_zero_conf(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1311 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_zero_conf();
1315 /// Set this feature as optional.
1317 pub extern "C" fn NodeFeatures_set_zero_conf_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1318 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_zero_conf_optional()
1321 /// Set this feature as required.
1323 pub extern "C" fn NodeFeatures_set_zero_conf_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1324 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_zero_conf_required()
1327 /// Checks if this feature is supported.
1330 pub extern "C" fn NodeFeatures_supports_zero_conf(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1331 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_zero_conf();
1335 /// Set this feature as optional.
1337 pub extern "C" fn ChannelTypeFeatures_set_zero_conf_optional(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
1338 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_zero_conf_optional()
1341 /// Set this feature as required.
1343 pub extern "C" fn ChannelTypeFeatures_set_zero_conf_required(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures) {
1344 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_zero_conf_required()
1347 /// Checks if this feature is supported.
1350 pub extern "C" fn ChannelTypeFeatures_supports_zero_conf(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
1351 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_zero_conf();
1355 /// Checks if this feature is required.
1358 pub extern "C" fn InitFeatures_requires_zero_conf(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1359 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_zero_conf();
1363 /// Checks if this feature is required.
1366 pub extern "C" fn NodeFeatures_requires_zero_conf(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1367 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_zero_conf();
1371 /// Checks if this feature is required.
1374 pub extern "C" fn ChannelTypeFeatures_requires_zero_conf(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
1375 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_zero_conf();
1379 /// Set this feature as optional.
1381 pub extern "C" fn NodeFeatures_set_keysend_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1382 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_keysend_optional()
1385 /// Set this feature as required.
1387 pub extern "C" fn NodeFeatures_set_keysend_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1388 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_keysend_required()
1391 /// Checks if this feature is supported.
1394 pub extern "C" fn NodeFeatures_supports_keysend(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1395 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_keysend();
1399 /// Checks if this feature is required.
1402 pub extern "C" fn NodeFeatures_requires_keysend(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1403 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_keysend();
1407 /// Set this feature as optional.
1409 pub extern "C" fn InitFeatures_set_trampoline_routing_optional(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1410 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_trampoline_routing_optional()
1413 /// Set this feature as required.
1415 pub extern "C" fn InitFeatures_set_trampoline_routing_required(this_arg: &mut crate::lightning::ln::features::InitFeatures) {
1416 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_trampoline_routing_required()
1419 /// Checks if this feature is supported.
1422 pub extern "C" fn InitFeatures_supports_trampoline_routing(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1423 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_trampoline_routing();
1427 /// Set this feature as optional.
1429 pub extern "C" fn NodeFeatures_set_trampoline_routing_optional(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1430 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_trampoline_routing_optional()
1433 /// Set this feature as required.
1435 pub extern "C" fn NodeFeatures_set_trampoline_routing_required(this_arg: &mut crate::lightning::ln::features::NodeFeatures) {
1436 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_trampoline_routing_required()
1439 /// Checks if this feature is supported.
1442 pub extern "C" fn NodeFeatures_supports_trampoline_routing(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1443 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_trampoline_routing();
1447 /// Set this feature as optional.
1449 pub extern "C" fn Bolt11InvoiceFeatures_set_trampoline_routing_optional(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
1450 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_trampoline_routing_optional()
1453 /// Set this feature as required.
1455 pub extern "C" fn Bolt11InvoiceFeatures_set_trampoline_routing_required(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures) {
1456 unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_trampoline_routing_required()
1459 /// Checks if this feature is supported.
1462 pub extern "C" fn Bolt11InvoiceFeatures_supports_trampoline_routing(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
1463 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.supports_trampoline_routing();
1467 /// Checks if this feature is required.
1470 pub extern "C" fn InitFeatures_requires_trampoline_routing(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
1471 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_trampoline_routing();
1475 /// Checks if this feature is required.
1478 pub extern "C" fn NodeFeatures_requires_trampoline_routing(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
1479 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_trampoline_routing();
1483 /// Checks if this feature is required.
1486 pub extern "C" fn Bolt11InvoiceFeatures_requires_trampoline_routing(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
1487 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_trampoline_routing();
1492 /// Checks if two InitFeaturess contain equal inner contents.
1493 /// This ignores pointers and is_owned flags and looks at the values in fields.
1494 /// Two objects with NULL inner values will be considered "equal" here.
1496 pub extern "C" fn InitFeatures_eq(a: &InitFeatures, b: &InitFeatures) -> bool {
1497 if a.inner == b.inner { return true; }
1498 if a.inner.is_null() || b.inner.is_null() { return false; }
1499 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1501 /// Checks if two NodeFeaturess contain equal inner contents.
1502 /// This ignores pointers and is_owned flags and looks at the values in fields.
1503 /// Two objects with NULL inner values will be considered "equal" here.
1505 pub extern "C" fn NodeFeatures_eq(a: &NodeFeatures, b: &NodeFeatures) -> bool {
1506 if a.inner == b.inner { return true; }
1507 if a.inner.is_null() || b.inner.is_null() { return false; }
1508 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1510 /// Checks if two ChannelFeaturess contain equal inner contents.
1511 /// This ignores pointers and is_owned flags and looks at the values in fields.
1512 /// Two objects with NULL inner values will be considered "equal" here.
1514 pub extern "C" fn ChannelFeatures_eq(a: &ChannelFeatures, b: &ChannelFeatures) -> bool {
1515 if a.inner == b.inner { return true; }
1516 if a.inner.is_null() || b.inner.is_null() { return false; }
1517 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1519 /// Checks if two Bolt11InvoiceFeaturess contain equal inner contents.
1520 /// This ignores pointers and is_owned flags and looks at the values in fields.
1521 /// Two objects with NULL inner values will be considered "equal" here.
1523 pub extern "C" fn Bolt11InvoiceFeatures_eq(a: &Bolt11InvoiceFeatures, b: &Bolt11InvoiceFeatures) -> bool {
1524 if a.inner == b.inner { return true; }
1525 if a.inner.is_null() || b.inner.is_null() { return false; }
1526 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1528 /// Checks if two OfferFeaturess contain equal inner contents.
1529 /// This ignores pointers and is_owned flags and looks at the values in fields.
1530 /// Two objects with NULL inner values will be considered "equal" here.
1532 pub extern "C" fn OfferFeatures_eq(a: &OfferFeatures, b: &OfferFeatures) -> bool {
1533 if a.inner == b.inner { return true; }
1534 if a.inner.is_null() || b.inner.is_null() { return false; }
1535 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1537 /// Checks if two InvoiceRequestFeaturess contain equal inner contents.
1538 /// This ignores pointers and is_owned flags and looks at the values in fields.
1539 /// Two objects with NULL inner values will be considered "equal" here.
1541 pub extern "C" fn InvoiceRequestFeatures_eq(a: &InvoiceRequestFeatures, b: &InvoiceRequestFeatures) -> bool {
1542 if a.inner == b.inner { return true; }
1543 if a.inner.is_null() || b.inner.is_null() { return false; }
1544 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1546 /// Checks if two Bolt12InvoiceFeaturess contain equal inner contents.
1547 /// This ignores pointers and is_owned flags and looks at the values in fields.
1548 /// Two objects with NULL inner values will be considered "equal" here.
1550 pub extern "C" fn Bolt12InvoiceFeatures_eq(a: &Bolt12InvoiceFeatures, b: &Bolt12InvoiceFeatures) -> bool {
1551 if a.inner == b.inner { return true; }
1552 if a.inner.is_null() || b.inner.is_null() { return false; }
1553 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1555 /// Checks if two BlindedHopFeaturess contain equal inner contents.
1556 /// This ignores pointers and is_owned flags and looks at the values in fields.
1557 /// Two objects with NULL inner values will be considered "equal" here.
1559 pub extern "C" fn BlindedHopFeatures_eq(a: &BlindedHopFeatures, b: &BlindedHopFeatures) -> bool {
1560 if a.inner == b.inner { return true; }
1561 if a.inner.is_null() || b.inner.is_null() { return false; }
1562 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1564 /// Checks if two ChannelTypeFeaturess contain equal inner contents.
1565 /// This ignores pointers and is_owned flags and looks at the values in fields.
1566 /// Two objects with NULL inner values will be considered "equal" here.
1568 pub extern "C" fn ChannelTypeFeatures_eq(a: &ChannelTypeFeatures, b: &ChannelTypeFeatures) -> bool {
1569 if a.inner == b.inner { return true; }
1570 if a.inner.is_null() || b.inner.is_null() { return false; }
1571 if a.get_native_ref() == b.get_native_ref() { true } else { false }
1573 impl Clone for InitFeatures {
1574 fn clone(&self) -> Self {
1576 inner: if <*mut nativeInitFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1577 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1583 /// Used only if an object of this type is returned as a trait impl by a method
1584 pub(crate) extern "C" fn InitFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1585 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeInitFeatures)).clone() })) as *mut c_void
1588 /// Creates a copy of the InitFeatures
1589 pub extern "C" fn InitFeatures_clone(orig: &InitFeatures) -> InitFeatures {
1592 impl Clone for NodeFeatures {
1593 fn clone(&self) -> Self {
1595 inner: if <*mut nativeNodeFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1596 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1602 /// Used only if an object of this type is returned as a trait impl by a method
1603 pub(crate) extern "C" fn NodeFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1604 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeNodeFeatures)).clone() })) as *mut c_void
1607 /// Creates a copy of the NodeFeatures
1608 pub extern "C" fn NodeFeatures_clone(orig: &NodeFeatures) -> NodeFeatures {
1611 impl Clone for ChannelFeatures {
1612 fn clone(&self) -> Self {
1614 inner: if <*mut nativeChannelFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1615 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1621 /// Used only if an object of this type is returned as a trait impl by a method
1622 pub(crate) extern "C" fn ChannelFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1623 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeChannelFeatures)).clone() })) as *mut c_void
1626 /// Creates a copy of the ChannelFeatures
1627 pub extern "C" fn ChannelFeatures_clone(orig: &ChannelFeatures) -> ChannelFeatures {
1630 impl Clone for Bolt11InvoiceFeatures {
1631 fn clone(&self) -> Self {
1633 inner: if <*mut nativeBolt11InvoiceFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1634 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1640 /// Used only if an object of this type is returned as a trait impl by a method
1641 pub(crate) extern "C" fn Bolt11InvoiceFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1642 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeBolt11InvoiceFeatures)).clone() })) as *mut c_void
1645 /// Creates a copy of the Bolt11InvoiceFeatures
1646 pub extern "C" fn Bolt11InvoiceFeatures_clone(orig: &Bolt11InvoiceFeatures) -> Bolt11InvoiceFeatures {
1649 impl Clone for OfferFeatures {
1650 fn clone(&self) -> Self {
1652 inner: if <*mut nativeOfferFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1653 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1659 /// Used only if an object of this type is returned as a trait impl by a method
1660 pub(crate) extern "C" fn OfferFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1661 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeOfferFeatures)).clone() })) as *mut c_void
1664 /// Creates a copy of the OfferFeatures
1665 pub extern "C" fn OfferFeatures_clone(orig: &OfferFeatures) -> OfferFeatures {
1668 impl Clone for InvoiceRequestFeatures {
1669 fn clone(&self) -> Self {
1671 inner: if <*mut nativeInvoiceRequestFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1672 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1678 /// Used only if an object of this type is returned as a trait impl by a method
1679 pub(crate) extern "C" fn InvoiceRequestFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1680 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeInvoiceRequestFeatures)).clone() })) as *mut c_void
1683 /// Creates a copy of the InvoiceRequestFeatures
1684 pub extern "C" fn InvoiceRequestFeatures_clone(orig: &InvoiceRequestFeatures) -> InvoiceRequestFeatures {
1687 impl Clone for Bolt12InvoiceFeatures {
1688 fn clone(&self) -> Self {
1690 inner: if <*mut nativeBolt12InvoiceFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1691 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1697 /// Used only if an object of this type is returned as a trait impl by a method
1698 pub(crate) extern "C" fn Bolt12InvoiceFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1699 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeBolt12InvoiceFeatures)).clone() })) as *mut c_void
1702 /// Creates a copy of the Bolt12InvoiceFeatures
1703 pub extern "C" fn Bolt12InvoiceFeatures_clone(orig: &Bolt12InvoiceFeatures) -> Bolt12InvoiceFeatures {
1706 impl Clone for BlindedHopFeatures {
1707 fn clone(&self) -> Self {
1709 inner: if <*mut nativeBlindedHopFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1710 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1716 /// Used only if an object of this type is returned as a trait impl by a method
1717 pub(crate) extern "C" fn BlindedHopFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1718 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeBlindedHopFeatures)).clone() })) as *mut c_void
1721 /// Creates a copy of the BlindedHopFeatures
1722 pub extern "C" fn BlindedHopFeatures_clone(orig: &BlindedHopFeatures) -> BlindedHopFeatures {
1725 impl Clone for ChannelTypeFeatures {
1726 fn clone(&self) -> Self {
1728 inner: if <*mut nativeChannelTypeFeatures>::is_null(self.inner) { core::ptr::null_mut() } else {
1729 ObjOps::heap_alloc(unsafe { &*ObjOps::untweak_ptr(self.inner) }.clone()) },
1735 /// Used only if an object of this type is returned as a trait impl by a method
1736 pub(crate) extern "C" fn ChannelTypeFeatures_clone_void(this_ptr: *const c_void) -> *mut c_void {
1737 Box::into_raw(Box::new(unsafe { (*(this_ptr as *const nativeChannelTypeFeatures)).clone() })) as *mut c_void
1740 /// Creates a copy of the ChannelTypeFeatures
1741 pub extern "C" fn ChannelTypeFeatures_clone(orig: &ChannelTypeFeatures) -> ChannelTypeFeatures {
1744 /// Generates a non-cryptographic 64-bit hash of the InitFeatures.
1746 pub extern "C" fn InitFeatures_hash(o: &InitFeatures) -> u64 {
1747 if o.inner.is_null() { return 0; }
1748 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1749 #[allow(deprecated)]
1750 let mut hasher = core::hash::SipHasher::new();
1751 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1752 core::hash::Hasher::finish(&hasher)
1754 /// Generates a non-cryptographic 64-bit hash of the NodeFeatures.
1756 pub extern "C" fn NodeFeatures_hash(o: &NodeFeatures) -> u64 {
1757 if o.inner.is_null() { return 0; }
1758 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1759 #[allow(deprecated)]
1760 let mut hasher = core::hash::SipHasher::new();
1761 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1762 core::hash::Hasher::finish(&hasher)
1764 /// Generates a non-cryptographic 64-bit hash of the ChannelFeatures.
1766 pub extern "C" fn ChannelFeatures_hash(o: &ChannelFeatures) -> u64 {
1767 if o.inner.is_null() { return 0; }
1768 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1769 #[allow(deprecated)]
1770 let mut hasher = core::hash::SipHasher::new();
1771 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1772 core::hash::Hasher::finish(&hasher)
1774 /// Generates a non-cryptographic 64-bit hash of the Bolt11InvoiceFeatures.
1776 pub extern "C" fn Bolt11InvoiceFeatures_hash(o: &Bolt11InvoiceFeatures) -> u64 {
1777 if o.inner.is_null() { return 0; }
1778 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1779 #[allow(deprecated)]
1780 let mut hasher = core::hash::SipHasher::new();
1781 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1782 core::hash::Hasher::finish(&hasher)
1784 /// Generates a non-cryptographic 64-bit hash of the OfferFeatures.
1786 pub extern "C" fn OfferFeatures_hash(o: &OfferFeatures) -> u64 {
1787 if o.inner.is_null() { return 0; }
1788 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1789 #[allow(deprecated)]
1790 let mut hasher = core::hash::SipHasher::new();
1791 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1792 core::hash::Hasher::finish(&hasher)
1794 /// Generates a non-cryptographic 64-bit hash of the InvoiceRequestFeatures.
1796 pub extern "C" fn InvoiceRequestFeatures_hash(o: &InvoiceRequestFeatures) -> u64 {
1797 if o.inner.is_null() { return 0; }
1798 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1799 #[allow(deprecated)]
1800 let mut hasher = core::hash::SipHasher::new();
1801 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1802 core::hash::Hasher::finish(&hasher)
1804 /// Generates a non-cryptographic 64-bit hash of the Bolt12InvoiceFeatures.
1806 pub extern "C" fn Bolt12InvoiceFeatures_hash(o: &Bolt12InvoiceFeatures) -> u64 {
1807 if o.inner.is_null() { return 0; }
1808 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1809 #[allow(deprecated)]
1810 let mut hasher = core::hash::SipHasher::new();
1811 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1812 core::hash::Hasher::finish(&hasher)
1814 /// Generates a non-cryptographic 64-bit hash of the BlindedHopFeatures.
1816 pub extern "C" fn BlindedHopFeatures_hash(o: &BlindedHopFeatures) -> u64 {
1817 if o.inner.is_null() { return 0; }
1818 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1819 #[allow(deprecated)]
1820 let mut hasher = core::hash::SipHasher::new();
1821 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1822 core::hash::Hasher::finish(&hasher)
1824 /// Generates a non-cryptographic 64-bit hash of the ChannelTypeFeatures.
1826 pub extern "C" fn ChannelTypeFeatures_hash(o: &ChannelTypeFeatures) -> u64 {
1827 if o.inner.is_null() { return 0; }
1828 // Note that we'd love to use alloc::collections::hash_map::DefaultHasher but it's not in core
1829 #[allow(deprecated)]
1830 let mut hasher = core::hash::SipHasher::new();
1831 core::hash::Hash::hash(o.get_native_ref(), &mut hasher);
1832 core::hash::Hasher::finish(&hasher)
1834 /// Get a string which allows debug introspection of a InitFeatures object
1835 pub extern "C" fn InitFeatures_debug_str_void(o: *const c_void) -> Str {
1836 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::InitFeatures }).into()}
1837 /// Get a string which allows debug introspection of a NodeFeatures object
1838 pub extern "C" fn NodeFeatures_debug_str_void(o: *const c_void) -> Str {
1839 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::NodeFeatures }).into()}
1840 /// Get a string which allows debug introspection of a ChannelFeatures object
1841 pub extern "C" fn ChannelFeatures_debug_str_void(o: *const c_void) -> Str {
1842 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::ChannelFeatures }).into()}
1843 /// Get a string which allows debug introspection of a Bolt11InvoiceFeatures object
1844 pub extern "C" fn Bolt11InvoiceFeatures_debug_str_void(o: *const c_void) -> Str {
1845 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::Bolt11InvoiceFeatures }).into()}
1846 /// Get a string which allows debug introspection of a OfferFeatures object
1847 pub extern "C" fn OfferFeatures_debug_str_void(o: *const c_void) -> Str {
1848 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::OfferFeatures }).into()}
1849 /// Get a string which allows debug introspection of a InvoiceRequestFeatures object
1850 pub extern "C" fn InvoiceRequestFeatures_debug_str_void(o: *const c_void) -> Str {
1851 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::InvoiceRequestFeatures }).into()}
1852 /// Get a string which allows debug introspection of a Bolt12InvoiceFeatures object
1853 pub extern "C" fn Bolt12InvoiceFeatures_debug_str_void(o: *const c_void) -> Str {
1854 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::Bolt12InvoiceFeatures }).into()}
1855 /// Get a string which allows debug introspection of a BlindedHopFeatures object
1856 pub extern "C" fn BlindedHopFeatures_debug_str_void(o: *const c_void) -> Str {
1857 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::BlindedHopFeatures }).into()}
1858 /// Get a string which allows debug introspection of a ChannelTypeFeatures object
1859 pub extern "C" fn ChannelTypeFeatures_debug_str_void(o: *const c_void) -> Str {
1860 alloc::format!("{:?}", unsafe { o as *const crate::lightning::ln::features::ChannelTypeFeatures }).into()}
1862 use lightning::ln::features::InitFeatures as nativeInitFeaturesImport;
1863 pub(crate) type nativeInitFeatures = nativeInitFeaturesImport;
1865 /// Features used within an `init` message.
1868 pub struct InitFeatures {
1869 /// A pointer to the opaque Rust object.
1871 /// Nearly everywhere, inner must be non-null, however in places where
1872 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
1873 pub inner: *mut nativeInitFeatures,
1874 /// Indicates that this is the only struct which contains the same pointer.
1876 /// Rust functions which take ownership of an object provided via an argument require
1877 /// this to be true and invalidate the object pointed to by inner.
1881 impl Drop for InitFeatures {
1882 fn drop(&mut self) {
1883 if self.is_owned && !<*mut nativeInitFeatures>::is_null(self.inner) {
1884 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
1888 /// Frees any resources used by the InitFeatures, if is_owned is set and inner is non-NULL.
1890 pub extern "C" fn InitFeatures_free(this_obj: InitFeatures) { }
1892 /// Used only if an object of this type is returned as a trait impl by a method
1893 pub(crate) extern "C" fn InitFeatures_free_void(this_ptr: *mut c_void) {
1894 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeInitFeatures) };
1898 pub(crate) fn get_native_ref(&self) -> &'static nativeInitFeatures {
1899 unsafe { &*ObjOps::untweak_ptr(self.inner) }
1901 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeInitFeatures {
1902 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
1904 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
1905 pub(crate) fn take_inner(mut self) -> *mut nativeInitFeatures {
1906 assert!(self.is_owned);
1907 let ret = ObjOps::untweak_ptr(self.inner);
1908 self.inner = core::ptr::null_mut();
1913 use lightning::ln::features::NodeFeatures as nativeNodeFeaturesImport;
1914 pub(crate) type nativeNodeFeatures = nativeNodeFeaturesImport;
1916 /// Features used within a `node_announcement` message.
1919 pub struct NodeFeatures {
1920 /// A pointer to the opaque Rust object.
1922 /// Nearly everywhere, inner must be non-null, however in places where
1923 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
1924 pub inner: *mut nativeNodeFeatures,
1925 /// Indicates that this is the only struct which contains the same pointer.
1927 /// Rust functions which take ownership of an object provided via an argument require
1928 /// this to be true and invalidate the object pointed to by inner.
1932 impl Drop for NodeFeatures {
1933 fn drop(&mut self) {
1934 if self.is_owned && !<*mut nativeNodeFeatures>::is_null(self.inner) {
1935 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
1939 /// Frees any resources used by the NodeFeatures, if is_owned is set and inner is non-NULL.
1941 pub extern "C" fn NodeFeatures_free(this_obj: NodeFeatures) { }
1943 /// Used only if an object of this type is returned as a trait impl by a method
1944 pub(crate) extern "C" fn NodeFeatures_free_void(this_ptr: *mut c_void) {
1945 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeNodeFeatures) };
1949 pub(crate) fn get_native_ref(&self) -> &'static nativeNodeFeatures {
1950 unsafe { &*ObjOps::untweak_ptr(self.inner) }
1952 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeNodeFeatures {
1953 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
1955 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
1956 pub(crate) fn take_inner(mut self) -> *mut nativeNodeFeatures {
1957 assert!(self.is_owned);
1958 let ret = ObjOps::untweak_ptr(self.inner);
1959 self.inner = core::ptr::null_mut();
1964 use lightning::ln::features::ChannelFeatures as nativeChannelFeaturesImport;
1965 pub(crate) type nativeChannelFeatures = nativeChannelFeaturesImport;
1967 /// Features used within a `channel_announcement` message.
1970 pub struct ChannelFeatures {
1971 /// A pointer to the opaque Rust object.
1973 /// Nearly everywhere, inner must be non-null, however in places where
1974 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
1975 pub inner: *mut nativeChannelFeatures,
1976 /// Indicates that this is the only struct which contains the same pointer.
1978 /// Rust functions which take ownership of an object provided via an argument require
1979 /// this to be true and invalidate the object pointed to by inner.
1983 impl Drop for ChannelFeatures {
1984 fn drop(&mut self) {
1985 if self.is_owned && !<*mut nativeChannelFeatures>::is_null(self.inner) {
1986 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
1990 /// Frees any resources used by the ChannelFeatures, if is_owned is set and inner is non-NULL.
1992 pub extern "C" fn ChannelFeatures_free(this_obj: ChannelFeatures) { }
1994 /// Used only if an object of this type is returned as a trait impl by a method
1995 pub(crate) extern "C" fn ChannelFeatures_free_void(this_ptr: *mut c_void) {
1996 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeChannelFeatures) };
1999 impl ChannelFeatures {
2000 pub(crate) fn get_native_ref(&self) -> &'static nativeChannelFeatures {
2001 unsafe { &*ObjOps::untweak_ptr(self.inner) }
2003 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeChannelFeatures {
2004 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
2006 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
2007 pub(crate) fn take_inner(mut self) -> *mut nativeChannelFeatures {
2008 assert!(self.is_owned);
2009 let ret = ObjOps::untweak_ptr(self.inner);
2010 self.inner = core::ptr::null_mut();
2015 use lightning::ln::features::Bolt11InvoiceFeatures as nativeBolt11InvoiceFeaturesImport;
2016 pub(crate) type nativeBolt11InvoiceFeatures = nativeBolt11InvoiceFeaturesImport;
2018 /// Features used within an invoice.
2021 pub struct Bolt11InvoiceFeatures {
2022 /// A pointer to the opaque Rust object.
2024 /// Nearly everywhere, inner must be non-null, however in places where
2025 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
2026 pub inner: *mut nativeBolt11InvoiceFeatures,
2027 /// Indicates that this is the only struct which contains the same pointer.
2029 /// Rust functions which take ownership of an object provided via an argument require
2030 /// this to be true and invalidate the object pointed to by inner.
2034 impl Drop for Bolt11InvoiceFeatures {
2035 fn drop(&mut self) {
2036 if self.is_owned && !<*mut nativeBolt11InvoiceFeatures>::is_null(self.inner) {
2037 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
2041 /// Frees any resources used by the Bolt11InvoiceFeatures, if is_owned is set and inner is non-NULL.
2043 pub extern "C" fn Bolt11InvoiceFeatures_free(this_obj: Bolt11InvoiceFeatures) { }
2045 /// Used only if an object of this type is returned as a trait impl by a method
2046 pub(crate) extern "C" fn Bolt11InvoiceFeatures_free_void(this_ptr: *mut c_void) {
2047 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeBolt11InvoiceFeatures) };
2050 impl Bolt11InvoiceFeatures {
2051 pub(crate) fn get_native_ref(&self) -> &'static nativeBolt11InvoiceFeatures {
2052 unsafe { &*ObjOps::untweak_ptr(self.inner) }
2054 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeBolt11InvoiceFeatures {
2055 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
2057 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
2058 pub(crate) fn take_inner(mut self) -> *mut nativeBolt11InvoiceFeatures {
2059 assert!(self.is_owned);
2060 let ret = ObjOps::untweak_ptr(self.inner);
2061 self.inner = core::ptr::null_mut();
2066 use lightning::ln::features::OfferFeatures as nativeOfferFeaturesImport;
2067 pub(crate) type nativeOfferFeatures = nativeOfferFeaturesImport;
2069 /// Features used within an `offer`.
2072 pub struct OfferFeatures {
2073 /// A pointer to the opaque Rust object.
2075 /// Nearly everywhere, inner must be non-null, however in places where
2076 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
2077 pub inner: *mut nativeOfferFeatures,
2078 /// Indicates that this is the only struct which contains the same pointer.
2080 /// Rust functions which take ownership of an object provided via an argument require
2081 /// this to be true and invalidate the object pointed to by inner.
2085 impl Drop for OfferFeatures {
2086 fn drop(&mut self) {
2087 if self.is_owned && !<*mut nativeOfferFeatures>::is_null(self.inner) {
2088 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
2092 /// Frees any resources used by the OfferFeatures, if is_owned is set and inner is non-NULL.
2094 pub extern "C" fn OfferFeatures_free(this_obj: OfferFeatures) { }
2096 /// Used only if an object of this type is returned as a trait impl by a method
2097 pub(crate) extern "C" fn OfferFeatures_free_void(this_ptr: *mut c_void) {
2098 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeOfferFeatures) };
2101 impl OfferFeatures {
2102 pub(crate) fn get_native_ref(&self) -> &'static nativeOfferFeatures {
2103 unsafe { &*ObjOps::untweak_ptr(self.inner) }
2105 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeOfferFeatures {
2106 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
2108 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
2109 pub(crate) fn take_inner(mut self) -> *mut nativeOfferFeatures {
2110 assert!(self.is_owned);
2111 let ret = ObjOps::untweak_ptr(self.inner);
2112 self.inner = core::ptr::null_mut();
2117 use lightning::ln::features::InvoiceRequestFeatures as nativeInvoiceRequestFeaturesImport;
2118 pub(crate) type nativeInvoiceRequestFeatures = nativeInvoiceRequestFeaturesImport;
2120 /// Features used within an `invoice_request`.
2123 pub struct InvoiceRequestFeatures {
2124 /// A pointer to the opaque Rust object.
2126 /// Nearly everywhere, inner must be non-null, however in places where
2127 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
2128 pub inner: *mut nativeInvoiceRequestFeatures,
2129 /// Indicates that this is the only struct which contains the same pointer.
2131 /// Rust functions which take ownership of an object provided via an argument require
2132 /// this to be true and invalidate the object pointed to by inner.
2136 impl Drop for InvoiceRequestFeatures {
2137 fn drop(&mut self) {
2138 if self.is_owned && !<*mut nativeInvoiceRequestFeatures>::is_null(self.inner) {
2139 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
2143 /// Frees any resources used by the InvoiceRequestFeatures, if is_owned is set and inner is non-NULL.
2145 pub extern "C" fn InvoiceRequestFeatures_free(this_obj: InvoiceRequestFeatures) { }
2147 /// Used only if an object of this type is returned as a trait impl by a method
2148 pub(crate) extern "C" fn InvoiceRequestFeatures_free_void(this_ptr: *mut c_void) {
2149 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeInvoiceRequestFeatures) };
2152 impl InvoiceRequestFeatures {
2153 pub(crate) fn get_native_ref(&self) -> &'static nativeInvoiceRequestFeatures {
2154 unsafe { &*ObjOps::untweak_ptr(self.inner) }
2156 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeInvoiceRequestFeatures {
2157 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
2159 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
2160 pub(crate) fn take_inner(mut self) -> *mut nativeInvoiceRequestFeatures {
2161 assert!(self.is_owned);
2162 let ret = ObjOps::untweak_ptr(self.inner);
2163 self.inner = core::ptr::null_mut();
2168 use lightning::ln::features::Bolt12InvoiceFeatures as nativeBolt12InvoiceFeaturesImport;
2169 pub(crate) type nativeBolt12InvoiceFeatures = nativeBolt12InvoiceFeaturesImport;
2171 /// Features used within an `invoice`.
2174 pub struct Bolt12InvoiceFeatures {
2175 /// A pointer to the opaque Rust object.
2177 /// Nearly everywhere, inner must be non-null, however in places where
2178 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
2179 pub inner: *mut nativeBolt12InvoiceFeatures,
2180 /// Indicates that this is the only struct which contains the same pointer.
2182 /// Rust functions which take ownership of an object provided via an argument require
2183 /// this to be true and invalidate the object pointed to by inner.
2187 impl Drop for Bolt12InvoiceFeatures {
2188 fn drop(&mut self) {
2189 if self.is_owned && !<*mut nativeBolt12InvoiceFeatures>::is_null(self.inner) {
2190 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
2194 /// Frees any resources used by the Bolt12InvoiceFeatures, if is_owned is set and inner is non-NULL.
2196 pub extern "C" fn Bolt12InvoiceFeatures_free(this_obj: Bolt12InvoiceFeatures) { }
2198 /// Used only if an object of this type is returned as a trait impl by a method
2199 pub(crate) extern "C" fn Bolt12InvoiceFeatures_free_void(this_ptr: *mut c_void) {
2200 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeBolt12InvoiceFeatures) };
2203 impl Bolt12InvoiceFeatures {
2204 pub(crate) fn get_native_ref(&self) -> &'static nativeBolt12InvoiceFeatures {
2205 unsafe { &*ObjOps::untweak_ptr(self.inner) }
2207 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeBolt12InvoiceFeatures {
2208 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
2210 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
2211 pub(crate) fn take_inner(mut self) -> *mut nativeBolt12InvoiceFeatures {
2212 assert!(self.is_owned);
2213 let ret = ObjOps::untweak_ptr(self.inner);
2214 self.inner = core::ptr::null_mut();
2219 use lightning::ln::features::BlindedHopFeatures as nativeBlindedHopFeaturesImport;
2220 pub(crate) type nativeBlindedHopFeatures = nativeBlindedHopFeaturesImport;
2222 /// Features used within BOLT 4 encrypted_data_tlv and BOLT 12 blinded_payinfo
2225 pub struct BlindedHopFeatures {
2226 /// A pointer to the opaque Rust object.
2228 /// Nearly everywhere, inner must be non-null, however in places where
2229 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
2230 pub inner: *mut nativeBlindedHopFeatures,
2231 /// Indicates that this is the only struct which contains the same pointer.
2233 /// Rust functions which take ownership of an object provided via an argument require
2234 /// this to be true and invalidate the object pointed to by inner.
2238 impl Drop for BlindedHopFeatures {
2239 fn drop(&mut self) {
2240 if self.is_owned && !<*mut nativeBlindedHopFeatures>::is_null(self.inner) {
2241 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
2245 /// Frees any resources used by the BlindedHopFeatures, if is_owned is set and inner is non-NULL.
2247 pub extern "C" fn BlindedHopFeatures_free(this_obj: BlindedHopFeatures) { }
2249 /// Used only if an object of this type is returned as a trait impl by a method
2250 pub(crate) extern "C" fn BlindedHopFeatures_free_void(this_ptr: *mut c_void) {
2251 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeBlindedHopFeatures) };
2254 impl BlindedHopFeatures {
2255 pub(crate) fn get_native_ref(&self) -> &'static nativeBlindedHopFeatures {
2256 unsafe { &*ObjOps::untweak_ptr(self.inner) }
2258 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeBlindedHopFeatures {
2259 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
2261 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
2262 pub(crate) fn take_inner(mut self) -> *mut nativeBlindedHopFeatures {
2263 assert!(self.is_owned);
2264 let ret = ObjOps::untweak_ptr(self.inner);
2265 self.inner = core::ptr::null_mut();
2270 use lightning::ln::features::ChannelTypeFeatures as nativeChannelTypeFeaturesImport;
2271 pub(crate) type nativeChannelTypeFeatures = nativeChannelTypeFeaturesImport;
2273 /// Features used within the channel_type field in an OpenChannel message.
2275 /// A channel is always of some known \"type\", describing the transaction formats used and the exact
2276 /// semantics of our interaction with our peer.
2278 /// Note that because a channel is a specific type which is proposed by the opener and accepted by
2279 /// the counterparty, only required features are allowed here.
2281 /// This is serialized differently from other feature types - it is not prefixed by a length, and
2282 /// thus must only appear inside a TLV where its length is known in advance.
2285 pub struct ChannelTypeFeatures {
2286 /// A pointer to the opaque Rust object.
2288 /// Nearly everywhere, inner must be non-null, however in places where
2289 /// the Rust equivalent takes an Option, it may be set to null to indicate None.
2290 pub inner: *mut nativeChannelTypeFeatures,
2291 /// Indicates that this is the only struct which contains the same pointer.
2293 /// Rust functions which take ownership of an object provided via an argument require
2294 /// this to be true and invalidate the object pointed to by inner.
2298 impl Drop for ChannelTypeFeatures {
2299 fn drop(&mut self) {
2300 if self.is_owned && !<*mut nativeChannelTypeFeatures>::is_null(self.inner) {
2301 let _ = unsafe { Box::from_raw(ObjOps::untweak_ptr(self.inner)) };
2305 /// Frees any resources used by the ChannelTypeFeatures, if is_owned is set and inner is non-NULL.
2307 pub extern "C" fn ChannelTypeFeatures_free(this_obj: ChannelTypeFeatures) { }
2309 /// Used only if an object of this type is returned as a trait impl by a method
2310 pub(crate) extern "C" fn ChannelTypeFeatures_free_void(this_ptr: *mut c_void) {
2311 let _ = unsafe { Box::from_raw(this_ptr as *mut nativeChannelTypeFeatures) };
2314 impl ChannelTypeFeatures {
2315 pub(crate) fn get_native_ref(&self) -> &'static nativeChannelTypeFeatures {
2316 unsafe { &*ObjOps::untweak_ptr(self.inner) }
2318 pub(crate) fn get_native_mut_ref(&self) -> &'static mut nativeChannelTypeFeatures {
2319 unsafe { &mut *ObjOps::untweak_ptr(self.inner) }
2321 /// When moving out of the pointer, we have to ensure we aren't a reference, this makes that easy
2322 pub(crate) fn take_inner(mut self) -> *mut nativeChannelTypeFeatures {
2323 assert!(self.is_owned);
2324 let ret = ObjOps::untweak_ptr(self.inner);
2325 self.inner = core::ptr::null_mut();
2329 /// Create a blank Features with no features set
2332 pub extern "C" fn InitFeatures_empty() -> crate::lightning::ln::features::InitFeatures {
2333 let mut ret = lightning::ln::features::InitFeatures::empty();
2334 crate::lightning::ln::features::InitFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
2337 /// Returns true if this `Features` object contains required features unknown by `other`.
2340 pub extern "C" fn InitFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::InitFeatures, other: &crate::lightning::ln::features::InitFeatures) -> bool {
2341 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
2345 /// Returns true if this `Features` object contains unknown feature flags which are set as
2349 pub extern "C" fn InitFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::InitFeatures) -> bool {
2350 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
2354 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
2357 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2358 /// be set instead (i.e., `bit - 1`).
2360 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2363 pub extern "C" fn InitFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::InitFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2364 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_required_feature_bit(bit);
2365 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2369 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
2372 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2373 /// set instead (i.e., `bit + 1`).
2375 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2378 pub extern "C" fn InitFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::InitFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2379 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_optional_feature_bit(bit);
2380 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2384 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
2385 /// by [bLIP 2] or if it is a known `T` feature.
2387 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2388 /// be set instead (i.e., `bit - 1`).
2390 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2393 pub extern "C" fn InitFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::InitFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2394 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_required_custom_bit(bit);
2395 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2399 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
2400 /// by [bLIP 2] or if it is a known `T` feature.
2402 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2403 /// set instead (i.e., `bit + 1`).
2405 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2408 pub extern "C" fn InitFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::InitFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2409 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInitFeatures)) }.set_optional_custom_bit(bit);
2410 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2414 /// Create a blank Features with no features set
2417 pub extern "C" fn NodeFeatures_empty() -> crate::lightning::ln::features::NodeFeatures {
2418 let mut ret = lightning::ln::features::NodeFeatures::empty();
2419 crate::lightning::ln::features::NodeFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
2422 /// Returns true if this `Features` object contains required features unknown by `other`.
2425 pub extern "C" fn NodeFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::NodeFeatures, other: &crate::lightning::ln::features::NodeFeatures) -> bool {
2426 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
2430 /// Returns true if this `Features` object contains unknown feature flags which are set as
2434 pub extern "C" fn NodeFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::NodeFeatures) -> bool {
2435 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
2439 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
2442 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2443 /// be set instead (i.e., `bit - 1`).
2445 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2448 pub extern "C" fn NodeFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::NodeFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2449 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_required_feature_bit(bit);
2450 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2454 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
2457 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2458 /// set instead (i.e., `bit + 1`).
2460 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2463 pub extern "C" fn NodeFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::NodeFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2464 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_optional_feature_bit(bit);
2465 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2469 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
2470 /// by [bLIP 2] or if it is a known `T` feature.
2472 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2473 /// be set instead (i.e., `bit - 1`).
2475 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2478 pub extern "C" fn NodeFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::NodeFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2479 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_required_custom_bit(bit);
2480 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2484 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
2485 /// by [bLIP 2] or if it is a known `T` feature.
2487 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2488 /// set instead (i.e., `bit + 1`).
2490 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2493 pub extern "C" fn NodeFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::NodeFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2494 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeNodeFeatures)) }.set_optional_custom_bit(bit);
2495 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2499 /// Create a blank Features with no features set
2502 pub extern "C" fn ChannelFeatures_empty() -> crate::lightning::ln::features::ChannelFeatures {
2503 let mut ret = lightning::ln::features::ChannelFeatures::empty();
2504 crate::lightning::ln::features::ChannelFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
2507 /// Returns true if this `Features` object contains required features unknown by `other`.
2510 pub extern "C" fn ChannelFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::ChannelFeatures, other: &crate::lightning::ln::features::ChannelFeatures) -> bool {
2511 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
2515 /// Returns true if this `Features` object contains unknown feature flags which are set as
2519 pub extern "C" fn ChannelFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::ChannelFeatures) -> bool {
2520 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
2524 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
2527 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2528 /// be set instead (i.e., `bit - 1`).
2530 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2533 pub extern "C" fn ChannelFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::ChannelFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2534 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelFeatures)) }.set_required_feature_bit(bit);
2535 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2539 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
2542 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2543 /// set instead (i.e., `bit + 1`).
2545 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2548 pub extern "C" fn ChannelFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::ChannelFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2549 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelFeatures)) }.set_optional_feature_bit(bit);
2550 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2554 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
2555 /// by [bLIP 2] or if it is a known `T` feature.
2557 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2558 /// be set instead (i.e., `bit - 1`).
2560 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2563 pub extern "C" fn ChannelFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::ChannelFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2564 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelFeatures)) }.set_required_custom_bit(bit);
2565 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2569 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
2570 /// by [bLIP 2] or if it is a known `T` feature.
2572 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2573 /// set instead (i.e., `bit + 1`).
2575 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2578 pub extern "C" fn ChannelFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::ChannelFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2579 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelFeatures)) }.set_optional_custom_bit(bit);
2580 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2584 /// Create a blank Features with no features set
2587 pub extern "C" fn Bolt11InvoiceFeatures_empty() -> crate::lightning::ln::features::Bolt11InvoiceFeatures {
2588 let mut ret = lightning::ln::features::Bolt11InvoiceFeatures::empty();
2589 crate::lightning::ln::features::Bolt11InvoiceFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
2592 /// Returns true if this `Features` object contains required features unknown by `other`.
2595 pub extern "C" fn Bolt11InvoiceFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures, other: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
2596 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
2600 /// Returns true if this `Features` object contains unknown feature flags which are set as
2604 pub extern "C" fn Bolt11InvoiceFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> bool {
2605 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
2609 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
2612 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2613 /// be set instead (i.e., `bit - 1`).
2615 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2618 pub extern "C" fn Bolt11InvoiceFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2619 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_required_feature_bit(bit);
2620 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2624 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
2627 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2628 /// set instead (i.e., `bit + 1`).
2630 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2633 pub extern "C" fn Bolt11InvoiceFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2634 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_optional_feature_bit(bit);
2635 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2639 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
2640 /// by [bLIP 2] or if it is a known `T` feature.
2642 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2643 /// be set instead (i.e., `bit - 1`).
2645 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2648 pub extern "C" fn Bolt11InvoiceFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2649 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_required_custom_bit(bit);
2650 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2654 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
2655 /// by [bLIP 2] or if it is a known `T` feature.
2657 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2658 /// set instead (i.e., `bit + 1`).
2660 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2663 pub extern "C" fn Bolt11InvoiceFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::Bolt11InvoiceFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2664 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt11InvoiceFeatures)) }.set_optional_custom_bit(bit);
2665 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2669 /// Create a blank Features with no features set
2672 pub extern "C" fn OfferFeatures_empty() -> crate::lightning::ln::features::OfferFeatures {
2673 let mut ret = lightning::ln::features::OfferFeatures::empty();
2674 crate::lightning::ln::features::OfferFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
2677 /// Returns true if this `Features` object contains required features unknown by `other`.
2680 pub extern "C" fn OfferFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::OfferFeatures, other: &crate::lightning::ln::features::OfferFeatures) -> bool {
2681 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
2685 /// Returns true if this `Features` object contains unknown feature flags which are set as
2689 pub extern "C" fn OfferFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::OfferFeatures) -> bool {
2690 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
2694 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
2697 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2698 /// be set instead (i.e., `bit - 1`).
2700 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2703 pub extern "C" fn OfferFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::OfferFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2704 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeOfferFeatures)) }.set_required_feature_bit(bit);
2705 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2709 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
2712 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2713 /// set instead (i.e., `bit + 1`).
2715 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2718 pub extern "C" fn OfferFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::OfferFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2719 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeOfferFeatures)) }.set_optional_feature_bit(bit);
2720 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2724 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
2725 /// by [bLIP 2] or if it is a known `T` feature.
2727 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2728 /// be set instead (i.e., `bit - 1`).
2730 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2733 pub extern "C" fn OfferFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::OfferFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2734 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeOfferFeatures)) }.set_required_custom_bit(bit);
2735 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2739 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
2740 /// by [bLIP 2] or if it is a known `T` feature.
2742 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2743 /// set instead (i.e., `bit + 1`).
2745 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2748 pub extern "C" fn OfferFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::OfferFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2749 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeOfferFeatures)) }.set_optional_custom_bit(bit);
2750 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2754 /// Create a blank Features with no features set
2757 pub extern "C" fn InvoiceRequestFeatures_empty() -> crate::lightning::ln::features::InvoiceRequestFeatures {
2758 let mut ret = lightning::ln::features::InvoiceRequestFeatures::empty();
2759 crate::lightning::ln::features::InvoiceRequestFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
2762 /// Returns true if this `Features` object contains required features unknown by `other`.
2765 pub extern "C" fn InvoiceRequestFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::InvoiceRequestFeatures, other: &crate::lightning::ln::features::InvoiceRequestFeatures) -> bool {
2766 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
2770 /// Returns true if this `Features` object contains unknown feature flags which are set as
2774 pub extern "C" fn InvoiceRequestFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::InvoiceRequestFeatures) -> bool {
2775 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
2779 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
2782 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2783 /// be set instead (i.e., `bit - 1`).
2785 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2788 pub extern "C" fn InvoiceRequestFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::InvoiceRequestFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2789 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInvoiceRequestFeatures)) }.set_required_feature_bit(bit);
2790 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2794 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
2797 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2798 /// set instead (i.e., `bit + 1`).
2800 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2803 pub extern "C" fn InvoiceRequestFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::InvoiceRequestFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2804 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInvoiceRequestFeatures)) }.set_optional_feature_bit(bit);
2805 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2809 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
2810 /// by [bLIP 2] or if it is a known `T` feature.
2812 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2813 /// be set instead (i.e., `bit - 1`).
2815 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2818 pub extern "C" fn InvoiceRequestFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::InvoiceRequestFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2819 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInvoiceRequestFeatures)) }.set_required_custom_bit(bit);
2820 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2824 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
2825 /// by [bLIP 2] or if it is a known `T` feature.
2827 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2828 /// set instead (i.e., `bit + 1`).
2830 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2833 pub extern "C" fn InvoiceRequestFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::InvoiceRequestFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2834 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeInvoiceRequestFeatures)) }.set_optional_custom_bit(bit);
2835 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2839 /// Create a blank Features with no features set
2842 pub extern "C" fn Bolt12InvoiceFeatures_empty() -> crate::lightning::ln::features::Bolt12InvoiceFeatures {
2843 let mut ret = lightning::ln::features::Bolt12InvoiceFeatures::empty();
2844 crate::lightning::ln::features::Bolt12InvoiceFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
2847 /// Returns true if this `Features` object contains required features unknown by `other`.
2850 pub extern "C" fn Bolt12InvoiceFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::Bolt12InvoiceFeatures, other: &crate::lightning::ln::features::Bolt12InvoiceFeatures) -> bool {
2851 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
2855 /// Returns true if this `Features` object contains unknown feature flags which are set as
2859 pub extern "C" fn Bolt12InvoiceFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::Bolt12InvoiceFeatures) -> bool {
2860 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
2864 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
2867 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2868 /// be set instead (i.e., `bit - 1`).
2870 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2873 pub extern "C" fn Bolt12InvoiceFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::Bolt12InvoiceFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2874 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt12InvoiceFeatures)) }.set_required_feature_bit(bit);
2875 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2879 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
2882 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2883 /// set instead (i.e., `bit + 1`).
2885 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2888 pub extern "C" fn Bolt12InvoiceFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::Bolt12InvoiceFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2889 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt12InvoiceFeatures)) }.set_optional_feature_bit(bit);
2890 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2894 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
2895 /// by [bLIP 2] or if it is a known `T` feature.
2897 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2898 /// be set instead (i.e., `bit - 1`).
2900 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2903 pub extern "C" fn Bolt12InvoiceFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::Bolt12InvoiceFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2904 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt12InvoiceFeatures)) }.set_required_custom_bit(bit);
2905 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2909 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
2910 /// by [bLIP 2] or if it is a known `T` feature.
2912 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2913 /// set instead (i.e., `bit + 1`).
2915 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2918 pub extern "C" fn Bolt12InvoiceFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::Bolt12InvoiceFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2919 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBolt12InvoiceFeatures)) }.set_optional_custom_bit(bit);
2920 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2924 /// Create a blank Features with no features set
2927 pub extern "C" fn BlindedHopFeatures_empty() -> crate::lightning::ln::features::BlindedHopFeatures {
2928 let mut ret = lightning::ln::features::BlindedHopFeatures::empty();
2929 crate::lightning::ln::features::BlindedHopFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
2932 /// Returns true if this `Features` object contains required features unknown by `other`.
2935 pub extern "C" fn BlindedHopFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::BlindedHopFeatures, other: &crate::lightning::ln::features::BlindedHopFeatures) -> bool {
2936 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
2940 /// Returns true if this `Features` object contains unknown feature flags which are set as
2944 pub extern "C" fn BlindedHopFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::BlindedHopFeatures) -> bool {
2945 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
2949 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
2952 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2953 /// be set instead (i.e., `bit - 1`).
2955 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2958 pub extern "C" fn BlindedHopFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::BlindedHopFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2959 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBlindedHopFeatures)) }.set_required_feature_bit(bit);
2960 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2964 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
2967 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2968 /// set instead (i.e., `bit + 1`).
2970 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
2973 pub extern "C" fn BlindedHopFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::BlindedHopFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2974 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBlindedHopFeatures)) }.set_optional_feature_bit(bit);
2975 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2979 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
2980 /// by [bLIP 2] or if it is a known `T` feature.
2982 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
2983 /// be set instead (i.e., `bit - 1`).
2985 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
2988 pub extern "C" fn BlindedHopFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::BlindedHopFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
2989 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBlindedHopFeatures)) }.set_required_custom_bit(bit);
2990 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
2994 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
2995 /// by [bLIP 2] or if it is a known `T` feature.
2997 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
2998 /// set instead (i.e., `bit + 1`).
3000 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
3003 pub extern "C" fn BlindedHopFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::BlindedHopFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
3004 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeBlindedHopFeatures)) }.set_optional_custom_bit(bit);
3005 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
3009 /// Create a blank Features with no features set
3012 pub extern "C" fn ChannelTypeFeatures_empty() -> crate::lightning::ln::features::ChannelTypeFeatures {
3013 let mut ret = lightning::ln::features::ChannelTypeFeatures::empty();
3014 crate::lightning::ln::features::ChannelTypeFeatures { inner: ObjOps::heap_alloc(ret), is_owned: true }
3017 /// Returns true if this `Features` object contains required features unknown by `other`.
3020 pub extern "C" fn ChannelTypeFeatures_requires_unknown_bits_from(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures, other: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
3021 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits_from(other.get_native_ref());
3025 /// Returns true if this `Features` object contains unknown feature flags which are set as
3029 pub extern "C" fn ChannelTypeFeatures_requires_unknown_bits(this_arg: &crate::lightning::ln::features::ChannelTypeFeatures) -> bool {
3030 let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.requires_unknown_bits();
3034 /// Sets a required feature bit. Errors if `bit` is outside the feature range as defined
3037 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
3038 /// be set instead (i.e., `bit - 1`).
3040 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
3043 pub extern "C" fn ChannelTypeFeatures_set_required_feature_bit(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
3044 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_required_feature_bit(bit);
3045 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
3049 /// Sets an optional feature bit. Errors if `bit` is outside the feature range as defined
3052 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
3053 /// set instead (i.e., `bit + 1`).
3055 /// [BOLT 9]: https://github.com/lightning/bolts/blob/master/09-features.md
3058 pub extern "C" fn ChannelTypeFeatures_set_optional_feature_bit(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
3059 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_optional_feature_bit(bit);
3060 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
3064 /// Sets a required custom feature bit. Errors if `bit` is outside the custom range as defined
3065 /// by [bLIP 2] or if it is a known `T` feature.
3067 /// Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
3068 /// be set instead (i.e., `bit - 1`).
3070 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
3073 pub extern "C" fn ChannelTypeFeatures_set_required_custom_bit(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
3074 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_required_custom_bit(bit);
3075 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
3079 /// Sets an optional custom feature bit. Errors if `bit` is outside the custom range as defined
3080 /// by [bLIP 2] or if it is a known `T` feature.
3082 /// Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
3083 /// set instead (i.e., `bit + 1`).
3085 /// [bLIP 2]: https://github.com/lightning/blips/blob/master/blip-0002.md#feature-bits
3088 pub extern "C" fn ChannelTypeFeatures_set_optional_custom_bit(this_arg: &mut crate::lightning::ln::features::ChannelTypeFeatures, mut bit: usize) -> crate::c_types::derived::CResult_NoneNoneZ {
3089 let mut ret = unsafe { &mut (*ObjOps::untweak_ptr(this_arg.inner as *mut crate::lightning::ln::features::nativeChannelTypeFeatures)) }.set_optional_custom_bit(bit);
3090 let mut local_ret = match ret { Ok(mut o) => crate::c_types::CResultTempl::ok( { () /*o*/ }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { () /*e*/ }).into() };
3095 /// Serialize the InitFeatures object into a byte array which can be read by InitFeatures_read
3096 pub extern "C" fn InitFeatures_write(obj: &crate::lightning::ln::features::InitFeatures) -> crate::c_types::derived::CVec_u8Z {
3097 crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
3100 pub(crate) extern "C" fn InitFeatures_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
3101 crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeInitFeatures) })
3104 /// Read a InitFeatures from a byte array, created by InitFeatures_write
3105 pub extern "C" fn InitFeatures_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_InitFeaturesDecodeErrorZ {
3106 let res: Result<lightning::ln::features::InitFeatures, lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj(ser);
3107 let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::ln::features::InitFeatures { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError::native_into(e) }).into() };
3111 /// Serialize the ChannelFeatures object into a byte array which can be read by ChannelFeatures_read
3112 pub extern "C" fn ChannelFeatures_write(obj: &crate::lightning::ln::features::ChannelFeatures) -> crate::c_types::derived::CVec_u8Z {
3113 crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
3116 pub(crate) extern "C" fn ChannelFeatures_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
3117 crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeChannelFeatures) })
3120 /// Read a ChannelFeatures from a byte array, created by ChannelFeatures_write
3121 pub extern "C" fn ChannelFeatures_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChannelFeaturesDecodeErrorZ {
3122 let res: Result<lightning::ln::features::ChannelFeatures, lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj(ser);
3123 let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::ln::features::ChannelFeatures { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError::native_into(e) }).into() };
3127 /// Serialize the NodeFeatures object into a byte array which can be read by NodeFeatures_read
3128 pub extern "C" fn NodeFeatures_write(obj: &crate::lightning::ln::features::NodeFeatures) -> crate::c_types::derived::CVec_u8Z {
3129 crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
3132 pub(crate) extern "C" fn NodeFeatures_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
3133 crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeNodeFeatures) })
3136 /// Read a NodeFeatures from a byte array, created by NodeFeatures_write
3137 pub extern "C" fn NodeFeatures_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_NodeFeaturesDecodeErrorZ {
3138 let res: Result<lightning::ln::features::NodeFeatures, lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj(ser);
3139 let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::ln::features::NodeFeatures { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError::native_into(e) }).into() };
3143 /// Serialize the Bolt11InvoiceFeatures object into a byte array which can be read by Bolt11InvoiceFeatures_read
3144 pub extern "C" fn Bolt11InvoiceFeatures_write(obj: &crate::lightning::ln::features::Bolt11InvoiceFeatures) -> crate::c_types::derived::CVec_u8Z {
3145 crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
3148 pub(crate) extern "C" fn Bolt11InvoiceFeatures_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
3149 crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeBolt11InvoiceFeatures) })
3152 /// Read a Bolt11InvoiceFeatures from a byte array, created by Bolt11InvoiceFeatures_write
3153 pub extern "C" fn Bolt11InvoiceFeatures_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_Bolt11InvoiceFeaturesDecodeErrorZ {
3154 let res: Result<lightning::ln::features::Bolt11InvoiceFeatures, lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj(ser);
3155 let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::ln::features::Bolt11InvoiceFeatures { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError::native_into(e) }).into() };
3159 /// Serialize the Bolt12InvoiceFeatures object into a byte array which can be read by Bolt12InvoiceFeatures_read
3160 pub extern "C" fn Bolt12InvoiceFeatures_write(obj: &crate::lightning::ln::features::Bolt12InvoiceFeatures) -> crate::c_types::derived::CVec_u8Z {
3161 crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
3164 pub(crate) extern "C" fn Bolt12InvoiceFeatures_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
3165 crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeBolt12InvoiceFeatures) })
3168 /// Read a Bolt12InvoiceFeatures from a byte array, created by Bolt12InvoiceFeatures_write
3169 pub extern "C" fn Bolt12InvoiceFeatures_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_Bolt12InvoiceFeaturesDecodeErrorZ {
3170 let res: Result<lightning::ln::features::Bolt12InvoiceFeatures, lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj(ser);
3171 let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::ln::features::Bolt12InvoiceFeatures { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError::native_into(e) }).into() };
3175 /// Serialize the BlindedHopFeatures object into a byte array which can be read by BlindedHopFeatures_read
3176 pub extern "C" fn BlindedHopFeatures_write(obj: &crate::lightning::ln::features::BlindedHopFeatures) -> crate::c_types::derived::CVec_u8Z {
3177 crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
3180 pub(crate) extern "C" fn BlindedHopFeatures_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
3181 crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeBlindedHopFeatures) })
3184 /// Read a BlindedHopFeatures from a byte array, created by BlindedHopFeatures_write
3185 pub extern "C" fn BlindedHopFeatures_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_BlindedHopFeaturesDecodeErrorZ {
3186 let res: Result<lightning::ln::features::BlindedHopFeatures, lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj(ser);
3187 let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::ln::features::BlindedHopFeatures { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError::native_into(e) }).into() };
3191 /// Serialize the ChannelTypeFeatures object into a byte array which can be read by ChannelTypeFeatures_read
3192 pub extern "C" fn ChannelTypeFeatures_write(obj: &crate::lightning::ln::features::ChannelTypeFeatures) -> crate::c_types::derived::CVec_u8Z {
3193 crate::c_types::serialize_obj(unsafe { &*obj }.get_native_ref())
3196 pub(crate) extern "C" fn ChannelTypeFeatures_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
3197 crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeChannelTypeFeatures) })
3200 /// Read a ChannelTypeFeatures from a byte array, created by ChannelTypeFeatures_write
3201 pub extern "C" fn ChannelTypeFeatures_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChannelTypeFeaturesDecodeErrorZ {
3202 let res: Result<lightning::ln::features::ChannelTypeFeatures, lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj(ser);
3203 let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::ln::features::ChannelTypeFeatures { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError::native_into(e) }).into() };