ferroui_system/lib.rs
1//! ferroui-system
2//!
3//! The parts of the base class library of .NET that FerroUI and its reusable libraries share, in
4//! Rust: thread-local variables that work on every target, events, change notification and the
5//! cancellation of work. Nothing here depends on the user interface; the base
6//! library of FerroUI re-exports every item at the path it had there.
7//!
8//! The modules follow the namespaces of .NET where an item ports one of its types; the items of the
9//! namespace `System` are at the root (`IDisposable`, `IObservable<T>`, `IObserver<T>`,
10//! `IProgress<T>`).
11//!
12//! - [`component_model`]: `System.ComponentModel` (`INotifyPropertyChanged`).
13//! - [`collections::generic`]: `System.Collections.Generic` (`Dictionary` with the order of
14//! enumeration of .NET).
15//! - [`collections::object_model`]: `System.Collections.ObjectModel` (`ObservableCollection`).
16//! - [`collections::specialized`]: `System.Collections.Specialized` (`INotifyCollectionChanged` and
17//! the arguments of a change).
18//! - [`threading`]: `System.Threading` (`CancellationToken` and its source) and
19//! `System.Threading.Tasks` (`Task<T>`, `TaskCompletionSource<T>`, futures run on their thread).
20//! - [`events`]: the multicast events and the lists of handlers that FerroUI's events are built on.
21//! - [`ferro_thread_local!`]: thread-local variables, `std::thread_local!` on every target with
22//! thread-local statics and one table per thread on Android ([`mod@ferro_thread_local`]).
23
24pub mod collections;
25pub mod component_model;
26pub mod events;
27pub mod ferro_thread_local;
28mod i_disposable;
29mod i_observable;
30mod i_progress;
31pub mod threading;
32
33pub use i_disposable::IDisposable;
34pub use i_observable::{IObservable, IObserver, ObservableError};
35pub use i_progress::IProgress;
36
37#[cfg(test)]
38mod tests;