pub struct BindingOptions {
pub reset_threshold: usize,
pub use_replace_for_updates: bool,
pub reset_on_first_time_load: bool,
}Expand description
The options of the binding of change sets to an observable collection (BindingOptions).
Fields§
§reset_threshold: usizeThe number of changes above which the collection is loaded again and a reset is raised
(ResetThreshold).
use_replace_for_updates: boolWhether an update replaces the item in place, rather than removing and adding it
(UseReplaceForUpdates).
reset_on_first_time_load: boolWhether the first change set loads the collection with a reset (ResetOnFirstTimeLoad).
Implementations§
Source§impl BindingOptions
impl BindingOptions
Sourcepub const DEFAULT_RESET_THRESHOLD: usize = 25
pub const DEFAULT_RESET_THRESHOLD: usize = 25
DefaultResetThreshold.
Sourcepub const DEFAULT_USE_REPLACE_FOR_UPDATES: bool = true
pub const DEFAULT_USE_REPLACE_FOR_UPDATES: bool = true
DefaultUseReplaceForUpdates.
Sourcepub const DEFAULT_RESET_ON_FIRST_TIME_LOAD: bool = true
pub const DEFAULT_RESET_ON_FIRST_TIME_LOAD: bool = true
DefaultResetOnFirstTimeLoad.
Sourcepub const fn new(reset_threshold: usize) -> Self
pub const fn new(reset_threshold: usize) -> Self
The options with the threshold and upstream’s defaults for the others
(BindingOptions(int ResetThreshold)).
Sourcepub const fn with_all(
reset_threshold: usize,
use_replace_for_updates: bool,
reset_on_first_time_load: bool,
) -> Self
pub const fn with_all( reset_threshold: usize, use_replace_for_updates: bool, reset_on_first_time_load: bool, ) -> Self
Every part (BindingOptions(int, bool, bool)).
Sourcepub const fn never_fire_reset() -> Self
pub const fn never_fire_reset() -> Self
The options that never reset the collection (NeverFireReset(bool useReplaceForUpdates = true)).
Sourcepub const fn never_fire_reset_with(use_replace_for_updates: bool) -> Self
pub const fn never_fire_reset_with(use_replace_for_updates: bool) -> Self
never_fire_reset with the choice of replacements
(NeverFireReset(bool)).
Sourcepub const fn with_reset_threshold(self, reset_threshold: usize) -> Self
pub const fn with_reset_threshold(self, reset_threshold: usize) -> Self
A copy with another threshold (with { ResetThreshold = .. }).
Sourcepub const fn with_use_replace_for_updates(
self,
use_replace_for_updates: bool,
) -> Self
pub const fn with_use_replace_for_updates( self, use_replace_for_updates: bool, ) -> Self
A copy with another choice of replacements (with { UseReplaceForUpdates = .. }).
Sourcepub const fn with_reset_on_first_time_load(
self,
reset_on_first_time_load: bool,
) -> Self
pub const fn with_reset_on_first_time_load( self, reset_on_first_time_load: bool, ) -> Self
A copy with another choice of the first load (with { ResetOnFirstTimeLoad = .. }).