ferroui-dynamic-data 0.3.0

A port of DynamicData for FerroUI: reactive collections, change sets, observable caches and lists with their operators, independent of the user interface
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! The options of the forms of `Bind` of lists that take a threshold
//! (`List/ObservableListEx.Bind.cs`).

use crate::binding::BindingOptions;
use crate::DynamicDataOptions;

/// The defaults of `DynamicDataOptions.Binding`, with `reset_threshold` unless it is upstream's
/// default (the retrofit of the system wide defaults of upstream).
pub(crate) fn bind_options(reset_threshold: usize) -> BindingOptions {
    let defaults = DynamicDataOptions::binding();
    if reset_threshold == BindingOptions::DEFAULT_RESET_THRESHOLD {
        defaults
    } else {
        defaults.with_reset_threshold(reset_threshold)
    }
}