AutoPersistCollectionMetadataMixins
trait · ferroui-reactiveui · v0.5.0
trait AutoPersistCollectionMetadataMixins<T: IReactiveObject>
The persistence of the items of a collection with explicit metadata (the extension members of
TCollection in AutoPersistHelperMixins.Persistence): each item in the collection is saved
when it changes, and an item removed from it is no longer watched.
The collection is an ObservableCollection of shared reactive objects.
Members
auto_persist_collection_metadataauto_persist_collection_metadata_with_intervalauto_persist_collection_metadata_withauto_persist_collection_metadata_provider
auto_persist_collection_metadata
fn auto_persist_collection_metadata(self: &Self, do_persist: impl Fn(Rc<T>) -> Rc<dyn IObservable<()>> + 'static, metadata: Rc<AutoPersistMetadata>) -> Rc<dyn IDisposable>
Persists each item with metadata, with the default interval
(AutoPersistCollection(Func, AutoPersistMetadata)).
auto_persist_collection_metadata_with_interval
fn auto_persist_collection_metadata_with_interval(self: &Self, do_persist: impl Fn(Rc<T>) -> Rc<dyn IObservable<()>> + 'static, metadata: Rc<AutoPersistMetadata>, interval: Option<Duration>) -> Rc<dyn IDisposable>
Persists each item with metadata, throttled on interval
(AutoPersistCollection(Func, AutoPersistMetadata, TimeSpan?)).
auto_persist_collection_metadata_with
fn auto_persist_collection_metadata_with<S: 'static>(self: &Self, do_persist: impl Fn(Rc<T>) -> Rc<dyn IObservable<()>> + 'static, manual_save_signal: Rc<dyn IObservable<S>>, metadata: Rc<AutoPersistMetadata>, interval: Option<Duration>) -> Rc<dyn IDisposable>
Persists each item with metadata, throttled on interval, and whenever
manual_save_signal ticks (AutoPersistCollection<TDontCare>(Func, IObservable<TDontCare>, AutoPersistMetadata, TimeSpan?) and the overload without the interval).
Panics when the metadata is not of a data contract (ArgumentException).
auto_persist_collection_metadata_provider
fn auto_persist_collection_metadata_provider<S: 'static>(self: &Self, do_persist: impl Fn(Rc<T>) -> Rc<dyn IObservable<()>> + 'static, manual_save_signal: Rc<dyn IObservable<S>>, metadata_provider: MetadataProvider<T>, interval: Option<Duration>) -> Rc<dyn IDisposable>
Persists each item with the metadata metadata_provider gives for it, throttled on
interval, and whenever manual_save_signal ticks (AutoPersistCollection<TDontCare>(Func, IObservable<TDontCare>, Func<TItem, AutoPersistMetadata>, TimeSpan?) and the overload
without the interval).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.