pub struct OptionizedSimplePolicy {Show 18 fields
pub min_delay: Option<u16>,
pub max_delay: Option<u16>,
pub max_channel_size_sat: Option<u64>,
pub epsilon_sat: Option<u64>,
pub max_htlcs: Option<usize>,
pub max_htlc_value_sat: Option<u64>,
pub use_chain_state: Option<bool>,
pub min_feerate_per_kw: Option<u32>,
pub max_feerate_per_kw: Option<u32>,
pub enforce_balance: Option<bool>,
pub max_routing_fee_msat: Option<u64>,
pub max_feerate_percentage: Option<u8>,
pub dev_flags: Option<Option<PolicyDevFlags>>,
pub filter: Option<PolicyFilter>,
pub global_velocity_control: Option<VelocityControlSpec>,
pub max_channels: Option<usize>,
pub max_invoices: Option<usize>,
pub fee_velocity_control: Option<VelocityControlSpec>,
}
Expand description
An optionized version of #struct_name.
Each field is wrapped in an Option.
See merge
and resolve_defaults
for more information.
Fields§
§min_delay: Option<u16>
§max_delay: Option<u16>
§max_channel_size_sat: Option<u64>
§epsilon_sat: Option<u64>
§max_htlcs: Option<usize>
§max_htlc_value_sat: Option<u64>
§use_chain_state: Option<bool>
§min_feerate_per_kw: Option<u32>
§max_feerate_per_kw: Option<u32>
§enforce_balance: Option<bool>
§max_routing_fee_msat: Option<u64>
§max_feerate_percentage: Option<u8>
§dev_flags: Option<Option<PolicyDevFlags>>
§filter: Option<PolicyFilter>
§global_velocity_control: Option<VelocityControlSpec>
§max_channels: Option<usize>
§max_invoices: Option<usize>
§fee_velocity_control: Option<VelocityControlSpec>
Implementations§
Source§impl OptionizedSimplePolicy
impl OptionizedSimplePolicy
Sourcepub fn resolve_defaults(self, defaults: SimplePolicy) -> SimplePolicy
pub fn resolve_defaults(self, defaults: SimplePolicy) -> SimplePolicy
Apply defaults to fields in self that are None and return a new instance of the original struct
Trait Implementations§
Source§impl Clone for OptionizedSimplePolicy
impl Clone for OptionizedSimplePolicy
Source§fn clone(&self) -> OptionizedSimplePolicy
fn clone(&self) -> OptionizedSimplePolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OptionizedSimplePolicy
impl Debug for OptionizedSimplePolicy
Source§impl Default for OptionizedSimplePolicy
impl Default for OptionizedSimplePolicy
Source§fn default() -> OptionizedSimplePolicy
fn default() -> OptionizedSimplePolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OptionizedSimplePolicy
impl<'de> Deserialize<'de> for OptionizedSimplePolicy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for OptionizedSimplePolicy
impl RefUnwindSafe for OptionizedSimplePolicy
impl Send for OptionizedSimplePolicy
impl Sync for OptionizedSimplePolicy
impl Unpin for OptionizedSimplePolicy
impl UnwindSafe for OptionizedSimplePolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more