pub struct Features<T: Context + ?Sized> { /* private fields */ }Expand description
Tracks the set of features which a node implements, templated by the context in which it appears.
This is not exported to bindings users as we map the concrete feature types below directly instead
Implementations§
Source§impl<T: DataLossProtect> Features<T>
impl<T: DataLossProtect> Features<T>
Sourcepub fn set_data_loss_protect_optional(&mut self)
pub fn set_data_loss_protect_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_data_loss_protect_required(&mut self)
pub fn set_data_loss_protect_required(&mut self)
Set this feature as required.
Sourcepub fn clear_data_loss_protect(&mut self)
pub fn clear_data_loss_protect(&mut self)
Unsets this feature.
Sourcepub fn supports_data_loss_protect(&self) -> bool
pub fn supports_data_loss_protect(&self) -> bool
Checks if this feature is supported.
Source§impl<T: DataLossProtect> Features<T>
impl<T: DataLossProtect> Features<T>
Sourcepub fn requires_data_loss_protect(&self) -> bool
pub fn requires_data_loss_protect(&self) -> bool
Checks if this feature is required.
Source§impl<T: InitialRoutingSync> Features<T>
impl<T: InitialRoutingSync> Features<T>
Sourcepub fn set_initial_routing_sync_optional(&mut self)
pub fn set_initial_routing_sync_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_initial_routing_sync_required(&mut self)
pub fn set_initial_routing_sync_required(&mut self)
Set this feature as required.
Sourcepub fn clear_initial_routing_sync(&mut self)
pub fn clear_initial_routing_sync(&mut self)
Unsets this feature.
Sourcepub fn initial_routing_sync(&self) -> bool
pub fn initial_routing_sync(&self) -> bool
Checks if this feature is supported.
Source§impl<T: UpfrontShutdownScript> Features<T>
impl<T: UpfrontShutdownScript> Features<T>
Sourcepub fn set_upfront_shutdown_script_optional(&mut self)
pub fn set_upfront_shutdown_script_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_upfront_shutdown_script_required(&mut self)
pub fn set_upfront_shutdown_script_required(&mut self)
Set this feature as required.
Sourcepub fn clear_upfront_shutdown_script(&mut self)
pub fn clear_upfront_shutdown_script(&mut self)
Unsets this feature.
Sourcepub fn supports_upfront_shutdown_script(&self) -> bool
pub fn supports_upfront_shutdown_script(&self) -> bool
Checks if this feature is supported.
Source§impl<T: UpfrontShutdownScript> Features<T>
impl<T: UpfrontShutdownScript> Features<T>
Sourcepub fn requires_upfront_shutdown_script(&self) -> bool
pub fn requires_upfront_shutdown_script(&self) -> bool
Checks if this feature is required.
Source§impl<T: GossipQueries> Features<T>
impl<T: GossipQueries> Features<T>
Sourcepub fn set_gossip_queries_optional(&mut self)
pub fn set_gossip_queries_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_gossip_queries_required(&mut self)
pub fn set_gossip_queries_required(&mut self)
Set this feature as required.
Sourcepub fn clear_gossip_queries(&mut self)
pub fn clear_gossip_queries(&mut self)
Unsets this feature.
Sourcepub fn supports_gossip_queries(&self) -> bool
pub fn supports_gossip_queries(&self) -> bool
Checks if this feature is supported.
Source§impl<T: GossipQueries> Features<T>
impl<T: GossipQueries> Features<T>
Sourcepub fn requires_gossip_queries(&self) -> bool
pub fn requires_gossip_queries(&self) -> bool
Checks if this feature is required.
Source§impl<T: VariableLengthOnion> Features<T>
impl<T: VariableLengthOnion> Features<T>
Sourcepub fn set_variable_length_onion_optional(&mut self)
pub fn set_variable_length_onion_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_variable_length_onion_required(&mut self)
pub fn set_variable_length_onion_required(&mut self)
Set this feature as required.
Sourcepub fn clear_variable_length_onion(&mut self)
pub fn clear_variable_length_onion(&mut self)
Unsets this feature.
Sourcepub fn supports_variable_length_onion(&self) -> bool
pub fn supports_variable_length_onion(&self) -> bool
Checks if this feature is supported.
Source§impl<T: VariableLengthOnion> Features<T>
impl<T: VariableLengthOnion> Features<T>
Sourcepub fn requires_variable_length_onion(&self) -> bool
pub fn requires_variable_length_onion(&self) -> bool
Checks if this feature is required.
Source§impl<T: StaticRemoteKey> Features<T>
impl<T: StaticRemoteKey> Features<T>
Sourcepub fn set_static_remote_key_optional(&mut self)
pub fn set_static_remote_key_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_static_remote_key_required(&mut self)
pub fn set_static_remote_key_required(&mut self)
Set this feature as required.
Sourcepub fn clear_static_remote_key(&mut self)
pub fn clear_static_remote_key(&mut self)
Unsets this feature.
Sourcepub fn supports_static_remote_key(&self) -> bool
pub fn supports_static_remote_key(&self) -> bool
Checks if this feature is supported.
Source§impl<T: StaticRemoteKey> Features<T>
impl<T: StaticRemoteKey> Features<T>
Sourcepub fn requires_static_remote_key(&self) -> bool
pub fn requires_static_remote_key(&self) -> bool
Checks if this feature is required.
Source§impl<T: PaymentSecret> Features<T>
impl<T: PaymentSecret> Features<T>
Sourcepub fn set_payment_secret_optional(&mut self)
pub fn set_payment_secret_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_payment_secret_required(&mut self)
pub fn set_payment_secret_required(&mut self)
Set this feature as required.
Sourcepub fn clear_payment_secret(&mut self)
pub fn clear_payment_secret(&mut self)
Unsets this feature.
Sourcepub fn supports_payment_secret(&self) -> bool
pub fn supports_payment_secret(&self) -> bool
Checks if this feature is supported.
Source§impl<T: PaymentSecret> Features<T>
impl<T: PaymentSecret> Features<T>
Sourcepub fn requires_payment_secret(&self) -> bool
pub fn requires_payment_secret(&self) -> bool
Checks if this feature is required.
Source§impl<T: BasicMPP> Features<T>
impl<T: BasicMPP> Features<T>
Sourcepub fn set_basic_mpp_optional(&mut self)
pub fn set_basic_mpp_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_basic_mpp_required(&mut self)
pub fn set_basic_mpp_required(&mut self)
Set this feature as required.
Sourcepub fn clear_basic_mpp(&mut self)
pub fn clear_basic_mpp(&mut self)
Unsets this feature.
Sourcepub fn supports_basic_mpp(&self) -> bool
pub fn supports_basic_mpp(&self) -> bool
Checks if this feature is supported.
Source§impl<T: BasicMPP> Features<T>
impl<T: BasicMPP> Features<T>
Sourcepub fn requires_basic_mpp(&self) -> bool
pub fn requires_basic_mpp(&self) -> bool
Checks if this feature is required.
Source§impl<T: Wumbo> Features<T>
impl<T: Wumbo> Features<T>
Sourcepub fn set_wumbo_optional(&mut self)
pub fn set_wumbo_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_wumbo_required(&mut self)
pub fn set_wumbo_required(&mut self)
Set this feature as required.
Sourcepub fn clear_wumbo(&mut self)
pub fn clear_wumbo(&mut self)
Unsets this feature.
Sourcepub fn supports_wumbo(&self) -> bool
pub fn supports_wumbo(&self) -> bool
Checks if this feature is supported.
Source§impl<T: Wumbo> Features<T>
impl<T: Wumbo> Features<T>
Sourcepub fn requires_wumbo(&self) -> bool
pub fn requires_wumbo(&self) -> bool
Checks if this feature is required.
Source§impl<T: AnchorsNonzeroFeeHtlcTx> Features<T>
impl<T: AnchorsNonzeroFeeHtlcTx> Features<T>
Sourcepub fn set_anchors_nonzero_fee_htlc_tx_optional(&mut self)
pub fn set_anchors_nonzero_fee_htlc_tx_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_anchors_nonzero_fee_htlc_tx_required(&mut self)
pub fn set_anchors_nonzero_fee_htlc_tx_required(&mut self)
Set this feature as required.
Sourcepub fn clear_anchors_nonzero_fee_htlc_tx(&mut self)
pub fn clear_anchors_nonzero_fee_htlc_tx(&mut self)
Unsets this feature.
Sourcepub fn supports_anchors_nonzero_fee_htlc_tx(&self) -> bool
pub fn supports_anchors_nonzero_fee_htlc_tx(&self) -> bool
Checks if this feature is supported.
Source§impl<T: AnchorsNonzeroFeeHtlcTx> Features<T>
impl<T: AnchorsNonzeroFeeHtlcTx> Features<T>
Sourcepub fn requires_anchors_nonzero_fee_htlc_tx(&self) -> bool
pub fn requires_anchors_nonzero_fee_htlc_tx(&self) -> bool
Checks if this feature is required.
Source§impl<T: AnchorsZeroFeeHtlcTx> Features<T>
impl<T: AnchorsZeroFeeHtlcTx> Features<T>
Sourcepub fn set_anchors_zero_fee_htlc_tx_optional(&mut self)
pub fn set_anchors_zero_fee_htlc_tx_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_anchors_zero_fee_htlc_tx_required(&mut self)
pub fn set_anchors_zero_fee_htlc_tx_required(&mut self)
Set this feature as required.
Sourcepub fn clear_anchors_zero_fee_htlc_tx(&mut self)
pub fn clear_anchors_zero_fee_htlc_tx(&mut self)
Unsets this feature.
Sourcepub fn supports_anchors_zero_fee_htlc_tx(&self) -> bool
pub fn supports_anchors_zero_fee_htlc_tx(&self) -> bool
Checks if this feature is supported.
Source§impl<T: AnchorsZeroFeeHtlcTx> Features<T>
impl<T: AnchorsZeroFeeHtlcTx> Features<T>
Sourcepub fn requires_anchors_zero_fee_htlc_tx(&self) -> bool
pub fn requires_anchors_zero_fee_htlc_tx(&self) -> bool
Checks if this feature is required.
Source§impl<T: RouteBlinding> Features<T>
impl<T: RouteBlinding> Features<T>
Sourcepub fn set_route_blinding_optional(&mut self)
pub fn set_route_blinding_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_route_blinding_required(&mut self)
pub fn set_route_blinding_required(&mut self)
Set this feature as required.
Sourcepub fn clear_route_blinding(&mut self)
pub fn clear_route_blinding(&mut self)
Unsets this feature.
Sourcepub fn supports_route_blinding(&self) -> bool
pub fn supports_route_blinding(&self) -> bool
Checks if this feature is supported.
Source§impl<T: RouteBlinding> Features<T>
impl<T: RouteBlinding> Features<T>
Sourcepub fn requires_route_blinding(&self) -> bool
pub fn requires_route_blinding(&self) -> bool
Checks if this feature is required.
Source§impl<T: ShutdownAnySegwit> Features<T>
impl<T: ShutdownAnySegwit> Features<T>
Sourcepub fn set_shutdown_any_segwit_optional(&mut self)
pub fn set_shutdown_any_segwit_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_shutdown_any_segwit_required(&mut self)
pub fn set_shutdown_any_segwit_required(&mut self)
Set this feature as required.
Sourcepub fn clear_shutdown_anysegwit(&mut self)
pub fn clear_shutdown_anysegwit(&mut self)
Unsets this feature.
Sourcepub fn supports_shutdown_anysegwit(&self) -> bool
pub fn supports_shutdown_anysegwit(&self) -> bool
Checks if this feature is supported.
Source§impl<T: ShutdownAnySegwit> Features<T>
impl<T: ShutdownAnySegwit> Features<T>
Sourcepub fn requires_shutdown_anysegwit(&self) -> bool
pub fn requires_shutdown_anysegwit(&self) -> bool
Checks if this feature is required.
Source§impl<T: DualFund> Features<T>
impl<T: DualFund> Features<T>
Sourcepub fn set_dual_fund_optional(&mut self)
pub fn set_dual_fund_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_dual_fund_required(&mut self)
pub fn set_dual_fund_required(&mut self)
Set this feature as required.
Sourcepub fn clear_dual_fund(&mut self)
pub fn clear_dual_fund(&mut self)
Unsets this feature.
Sourcepub fn supports_dual_fund(&self) -> bool
pub fn supports_dual_fund(&self) -> bool
Checks if this feature is supported.
Source§impl<T: DualFund> Features<T>
impl<T: DualFund> Features<T>
Sourcepub fn requires_dual_fund(&self) -> bool
pub fn requires_dual_fund(&self) -> bool
Checks if this feature is required.
Source§impl<T: Taproot> Features<T>
impl<T: Taproot> Features<T>
Sourcepub fn set_taproot_optional(&mut self)
pub fn set_taproot_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_taproot_required(&mut self)
pub fn set_taproot_required(&mut self)
Set this feature as required.
Sourcepub fn clear_taproot(&mut self)
pub fn clear_taproot(&mut self)
Unsets this feature.
Sourcepub fn supports_taproot(&self) -> bool
pub fn supports_taproot(&self) -> bool
Checks if this feature is supported.
Source§impl<T: Taproot> Features<T>
impl<T: Taproot> Features<T>
Sourcepub fn requires_taproot(&self) -> bool
pub fn requires_taproot(&self) -> bool
Checks if this feature is required.
Source§impl<T: Quiescence> Features<T>
impl<T: Quiescence> Features<T>
Sourcepub fn set_quiescence_optional(&mut self)
pub fn set_quiescence_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_quiescence_required(&mut self)
pub fn set_quiescence_required(&mut self)
Set this feature as required.
Sourcepub fn clear_quiescence(&mut self)
pub fn clear_quiescence(&mut self)
Unsets this feature.
Sourcepub fn supports_quiescence(&self) -> bool
pub fn supports_quiescence(&self) -> bool
Checks if this feature is supported.
Source§impl<T: Quiescence> Features<T>
impl<T: Quiescence> Features<T>
Sourcepub fn requires_quiescence(&self) -> bool
pub fn requires_quiescence(&self) -> bool
Checks if this feature is required.
Source§impl<T: OnionMessages> Features<T>
impl<T: OnionMessages> Features<T>
Sourcepub fn set_onion_messages_optional(&mut self)
pub fn set_onion_messages_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_onion_messages_required(&mut self)
pub fn set_onion_messages_required(&mut self)
Set this feature as required.
Sourcepub fn clear_onion_messages(&mut self)
pub fn clear_onion_messages(&mut self)
Unsets this feature.
Sourcepub fn supports_onion_messages(&self) -> bool
pub fn supports_onion_messages(&self) -> bool
Checks if this feature is supported.
Source§impl<T: OnionMessages> Features<T>
impl<T: OnionMessages> Features<T>
Sourcepub fn requires_onion_messages(&self) -> bool
pub fn requires_onion_messages(&self) -> bool
Checks if this feature is required.
Source§impl<T: ProvideStorage> Features<T>
impl<T: ProvideStorage> Features<T>
Sourcepub fn set_provide_storage_optional(&mut self)
pub fn set_provide_storage_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_provide_storage_required(&mut self)
pub fn set_provide_storage_required(&mut self)
Set this feature as required.
Sourcepub fn clear_provide_storage(&mut self)
pub fn clear_provide_storage(&mut self)
Unsets this feature.
Sourcepub fn supports_provide_storage(&self) -> bool
pub fn supports_provide_storage(&self) -> bool
Checks if this feature is supported.
Source§impl<T: ProvideStorage> Features<T>
impl<T: ProvideStorage> Features<T>
Sourcepub fn requires_provide_storage(&self) -> bool
pub fn requires_provide_storage(&self) -> bool
Checks if this feature is required.
Source§impl<T: ChannelType> Features<T>
impl<T: ChannelType> Features<T>
Sourcepub fn set_channel_type_optional(&mut self)
pub fn set_channel_type_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_channel_type_required(&mut self)
pub fn set_channel_type_required(&mut self)
Set this feature as required.
Sourcepub fn clear_channel_type(&mut self)
pub fn clear_channel_type(&mut self)
Unsets this feature.
Sourcepub fn supports_channel_type(&self) -> bool
pub fn supports_channel_type(&self) -> bool
Checks if this feature is supported.
Source§impl<T: ChannelType> Features<T>
impl<T: ChannelType> Features<T>
Sourcepub fn requires_channel_type(&self) -> bool
pub fn requires_channel_type(&self) -> bool
Checks if this feature is required.
Source§impl<T: SCIDPrivacy> Features<T>
impl<T: SCIDPrivacy> Features<T>
Sourcepub fn set_scid_privacy_optional(&mut self)
pub fn set_scid_privacy_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_scid_privacy_required(&mut self)
pub fn set_scid_privacy_required(&mut self)
Set this feature as required.
Sourcepub fn clear_scid_privacy(&mut self)
pub fn clear_scid_privacy(&mut self)
Unsets this feature.
Sourcepub fn supports_scid_privacy(&self) -> bool
pub fn supports_scid_privacy(&self) -> bool
Checks if this feature is supported.
Source§impl<T: SCIDPrivacy> Features<T>
impl<T: SCIDPrivacy> Features<T>
Sourcepub fn requires_scid_privacy(&self) -> bool
pub fn requires_scid_privacy(&self) -> bool
Checks if this feature is required.
Source§impl<T: PaymentMetadata> Features<T>
impl<T: PaymentMetadata> Features<T>
Sourcepub fn set_payment_metadata_optional(&mut self)
pub fn set_payment_metadata_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_payment_metadata_required(&mut self)
pub fn set_payment_metadata_required(&mut self)
Set this feature as required.
Sourcepub fn clear_payment_metadata(&mut self)
pub fn clear_payment_metadata(&mut self)
Unsets this feature.
Sourcepub fn supports_payment_metadata(&self) -> bool
pub fn supports_payment_metadata(&self) -> bool
Checks if this feature is supported.
Source§impl<T: PaymentMetadata> Features<T>
impl<T: PaymentMetadata> Features<T>
Sourcepub fn requires_payment_metadata(&self) -> bool
pub fn requires_payment_metadata(&self) -> bool
Checks if this feature is required.
Source§impl<T: ZeroConf> Features<T>
impl<T: ZeroConf> Features<T>
Sourcepub fn set_zero_conf_optional(&mut self)
pub fn set_zero_conf_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_zero_conf_required(&mut self)
pub fn set_zero_conf_required(&mut self)
Set this feature as required.
Sourcepub fn supports_zero_conf(&mut self)
pub fn supports_zero_conf(&mut self)
Unsets this feature.
Sourcepub fn requires_zero_conf(&self) -> bool
pub fn requires_zero_conf(&self) -> bool
Checks if this feature is supported.
Source§impl<T: Keysend> Features<T>
impl<T: Keysend> Features<T>
Sourcepub fn set_keysend_optional(&mut self)
pub fn set_keysend_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_keysend_required(&mut self)
pub fn set_keysend_required(&mut self)
Set this feature as required.
Sourcepub fn clear_keysend(&mut self)
pub fn clear_keysend(&mut self)
Unsets this feature.
Sourcepub fn supports_keysend(&self) -> bool
pub fn supports_keysend(&self) -> bool
Checks if this feature is supported.
Source§impl<T: Keysend> Features<T>
impl<T: Keysend> Features<T>
Sourcepub fn requires_keysend(&self) -> bool
pub fn requires_keysend(&self) -> bool
Checks if this feature is required.
Source§impl<T: Trampoline> Features<T>
impl<T: Trampoline> Features<T>
Sourcepub fn set_trampoline_routing_optional(&mut self)
pub fn set_trampoline_routing_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_trampoline_routing_required(&mut self)
pub fn set_trampoline_routing_required(&mut self)
Set this feature as required.
Sourcepub fn clear_trampoline_routing(&mut self)
pub fn clear_trampoline_routing(&mut self)
Unsets this feature.
Sourcepub fn supports_trampoline_routing(&self) -> bool
pub fn supports_trampoline_routing(&self) -> bool
Checks if this feature is supported.
Source§impl<T: Trampoline> Features<T>
impl<T: Trampoline> Features<T>
Sourcepub fn requires_trampoline_routing(&self) -> bool
pub fn requires_trampoline_routing(&self) -> bool
Checks if this feature is required.
Source§impl<T: SimpleClose> Features<T>
impl<T: SimpleClose> Features<T>
Sourcepub fn set_simple_close_optional(&mut self)
pub fn set_simple_close_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_simple_close_required(&mut self)
pub fn set_simple_close_required(&mut self)
Set this feature as required.
Sourcepub fn clear_simple_close(&mut self)
pub fn clear_simple_close(&mut self)
Unsets this feature.
Sourcepub fn supports_simple_close(&self) -> bool
pub fn supports_simple_close(&self) -> bool
Checks if this feature is supported.
Source§impl<T: SimpleClose> Features<T>
impl<T: SimpleClose> Features<T>
Sourcepub fn requires_simple_close(&self) -> bool
pub fn requires_simple_close(&self) -> bool
Checks if this feature is required.
Source§impl<T: SpliceProduction> Features<T>
impl<T: SpliceProduction> Features<T>
Sourcepub fn set_splicing_production_optional(&mut self)
pub fn set_splicing_production_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_splicing_production_required(&mut self)
pub fn set_splicing_production_required(&mut self)
Set this feature as required.
Sourcepub fn clear_splicing_production(&mut self)
pub fn clear_splicing_production(&mut self)
Unsets this feature.
Sourcepub fn supports_splicing_production(&self) -> bool
pub fn supports_splicing_production(&self) -> bool
Checks if this feature is supported.
Source§impl<T: SpliceProduction> Features<T>
impl<T: SpliceProduction> Features<T>
Sourcepub fn requires_splicing_production(&self) -> bool
pub fn requires_splicing_production(&self) -> bool
Checks if this feature is required.
Source§impl<T: AnchorZeroFeeCommitmentsStaging> Features<T>
impl<T: AnchorZeroFeeCommitmentsStaging> Features<T>
Sourcepub fn set_anchor_zero_fee_commitments_optional(&mut self)
pub fn set_anchor_zero_fee_commitments_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_anchor_zero_fee_commitments_required(&mut self)
pub fn set_anchor_zero_fee_commitments_required(&mut self)
Set this feature as required.
Sourcepub fn clear_anchor_zero_fee_commitments(&mut self)
pub fn clear_anchor_zero_fee_commitments(&mut self)
Unsets this feature.
Sourcepub fn supports_anchor_zero_fee_commitments(&self) -> bool
pub fn supports_anchor_zero_fee_commitments(&self) -> bool
Checks if this feature is supported.
Source§impl<T: AnchorZeroFeeCommitmentsStaging> Features<T>
impl<T: AnchorZeroFeeCommitmentsStaging> Features<T>
Sourcepub fn requires_anchor_zero_fee_commitments(&self) -> bool
pub fn requires_anchor_zero_fee_commitments(&self) -> bool
Checks if this feature is required.
Source§impl<T: HtlcHold> Features<T>
impl<T: HtlcHold> Features<T>
Sourcepub fn set_htlc_hold_optional(&mut self)
pub fn set_htlc_hold_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_htlc_hold_required(&mut self)
pub fn set_htlc_hold_required(&mut self)
Set this feature as required.
Sourcepub fn clear_htlc_hold(&mut self)
pub fn clear_htlc_hold(&mut self)
Unsets this feature.
Sourcepub fn supports_htlc_hold(&self) -> bool
pub fn supports_htlc_hold(&self) -> bool
Checks if this feature is supported.
Source§impl<T: HtlcHold> Features<T>
impl<T: HtlcHold> Features<T>
Sourcepub fn requires_htlc_hold(&self) -> bool
pub fn requires_htlc_hold(&self) -> bool
Checks if this feature is required.
Source§impl<T: SplicePrototype> Features<T>
impl<T: SplicePrototype> Features<T>
Sourcepub fn set_splicing_optional(&mut self)
pub fn set_splicing_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_splicing_required(&mut self)
pub fn set_splicing_required(&mut self)
Set this feature as required.
Sourcepub fn clear_splicing(&mut self)
pub fn clear_splicing(&mut self)
Unsets this feature.
Sourcepub fn supports_splicing(&self) -> bool
pub fn supports_splicing(&self) -> bool
Checks if this feature is supported.
Source§impl<T: SplicePrototype> Features<T>
impl<T: SplicePrototype> Features<T>
Sourcepub fn requires_splicing(&self) -> bool
pub fn requires_splicing(&self) -> bool
Checks if this feature is required.
Source§impl<T: DnsResolver> Features<T>
impl<T: DnsResolver> Features<T>
Sourcepub fn set_dns_resolution_optional(&mut self)
pub fn set_dns_resolution_optional(&mut self)
Set this feature as optional.
Sourcepub fn set_dns_resolution_required(&mut self)
pub fn set_dns_resolution_required(&mut self)
Set this feature as required.
Sourcepub fn clear_dns_resolution(&mut self)
pub fn clear_dns_resolution(&mut self)
Unsets this feature.
Sourcepub fn supports_dns_resolution(&self) -> bool
pub fn supports_dns_resolution(&self) -> bool
Checks if this feature is supported.
Source§impl<T: DnsResolver> Features<T>
impl<T: DnsResolver> Features<T>
Sourcepub fn requires_dns_resolution(&self) -> bool
pub fn requires_dns_resolution(&self) -> bool
Checks if this feature is required.
Source§impl Features<Bolt11InvoiceContext>
impl Features<Bolt11InvoiceContext>
Sourcepub fn for_keysend(allow_mpp: bool) -> Bolt11InvoiceFeatures
pub fn for_keysend(allow_mpp: bool) -> Bolt11InvoiceFeatures
Getting a route for a keysend payment to a private node requires providing the payee’s
features (since they were not announced in a node announcement). However, keysend payments
don’t have an invoice to pull the payee’s features from, so this method is provided for use
when a Bolt11InvoiceFeatures is required in a route.
MPP keysend is not widely supported yet, so we parameterize support to allow the user to choose whether their router should find multi-part routes.
Source§impl Features<ChannelTypeContext>
impl Features<ChannelTypeContext>
Sourcepub fn only_static_remote_key() -> Self
pub fn only_static_remote_key() -> Self
Constructs a ChannelTypeFeatures with only static_remotekey set
Sourcepub fn anchors_zero_htlc_fee_and_dependencies() -> Self
pub fn anchors_zero_htlc_fee_and_dependencies() -> Self
Constructs a ChannelTypeFeatures with anchors support
Sourcepub fn anchors_zero_fee_commitments() -> Self
pub fn anchors_zero_fee_commitments() -> Self
Constructs a ChannelTypeFeatures with zero fee commitment anchors support.
Source§impl<T: Context> Features<T>
impl<T: Context> Features<T>
Sourcepub fn from_le_bytes(flags: Vec<u8>) -> Features<T>
pub fn from_le_bytes(flags: Vec<u8>) -> Features<T>
Create a Features given a set of flags, in little-endian. This is in reverse byte order from most on-the-wire encodings.
This is not exported to bindings users as we don’t support export across multiple T
Sourcepub fn le_flags(&self) -> &[u8]
pub fn le_flags(&self) -> &[u8]
Returns the feature set as a list of bytes, in little-endian. This is in reverse byte order from most on-the-wire encodings.
Sourcepub fn from_be_bytes(flags: Vec<u8>) -> Features<T>
pub fn from_be_bytes(flags: Vec<u8>) -> Features<T>
Create a Features given a set of flags, in big-endian. This is in byte order from
most on-the-wire encodings.
This is not exported to bindings users as we don’t support export across multiple T
Sourcepub fn supports_any_optional_bits(&self) -> bool
pub fn supports_any_optional_bits(&self) -> bool
Returns true if this Features has any optional flags set
Sourcepub fn requires_unknown_bits_from(&self, other: &Self) -> bool
pub fn requires_unknown_bits_from(&self, other: &Self) -> bool
Returns true if this Features object contains required features unknown by other.
Sourcepub fn required_unknown_bits_from(&self, other: &Self) -> Vec<u64>
pub fn required_unknown_bits_from(&self, other: &Self) -> Vec<u64>
Returns the set of required features unknown by other, as their bit position.
Sourcepub fn requires_unknown_bits(&self) -> bool
pub fn requires_unknown_bits(&self) -> bool
Returns true if this Features object contains unknown feature flags which are set as
“required”.
Sourcepub fn supports_unknown_bits(&self) -> bool
pub fn supports_unknown_bits(&self) -> bool
Returns true if this Features supports any bits which we do not know of
Sourcepub fn set_required_feature_bit(&mut self, bit: usize) -> Result<(), ()>
pub fn set_required_feature_bit(&mut self, bit: usize) -> Result<(), ()>
Sets a required feature bit. Errors if bit is outside the feature range as defined
by BOLT 9.
Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
be set instead (i.e., bit - 1).
Sourcepub fn set_optional_feature_bit(&mut self, bit: usize) -> Result<(), ()>
pub fn set_optional_feature_bit(&mut self, bit: usize) -> Result<(), ()>
Sets an optional feature bit. Errors if bit is outside the feature range as defined
by BOLT 9.
Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
set instead (i.e., bit + 1).
Sourcepub fn set_required_custom_bit(&mut self, bit: usize) -> Result<(), ()>
pub fn set_required_custom_bit(&mut self, bit: usize) -> Result<(), ()>
Sets a required custom feature bit. Errors if bit is outside the custom range as defined
by bLIP 2 or if it is a known T feature.
Note: Required bits are even. If an odd bit is given, then the corresponding even bit will
be set instead (i.e., bit - 1).
Sourcepub fn set_optional_custom_bit(&mut self, bit: usize) -> Result<(), ()>
pub fn set_optional_custom_bit(&mut self, bit: usize) -> Result<(), ()>
Sets an optional custom feature bit. Errors if bit is outside the custom range as defined
by bLIP 2 or if it is a known T feature.
Note: Optional bits are odd. If an even bit is given, then the corresponding odd bit will be
set instead (i.e., bit + 1).
Trait Implementations§
Source§impl<T: Context, Rhs: Borrow<Self>> BitOrAssign<Rhs> for Features<T>
impl<T: Context, Rhs: Borrow<Self>> BitOrAssign<Rhs> for Features<T>
Source§fn bitor_assign(&mut self, rhs: Rhs)
fn bitor_assign(&mut self, rhs: Rhs)
|= operation. Read more