Skip to main content

Module kernel

Module kernel 

Source
Expand description

The kernel of DynamicData (DynamicData/Kernel): the extensions of Option<T> (upstream’s Optional<T>) and of its sequences, the status of a connection, the error of an item, the pairs of an item with its index or a value, and the helpers of sequences and schedulers.

Upstream’s Optional<T> is Rust’s Option<T> (docs/porting/reactive.md, section 5.4), so Optional.cs itself has no counterpart; ReferenceEqualityComparer is Rc::ptr_eq, ReadOnlyCollectionLight is Vec<T>, EnumerableIList/EnumeratorIList/IEnumerableIList are the slices and Vecs of Rust, ISupportsCapacity is Vec::with_capacity, and ParallelEx (PLINQ) is not ported.

Structs§

Error
An item that an operator could not handle, with its key and the error it raised (Error<TObject, TKey>): what the error handler of TransformSafe receives.
ItemWithIndex
An item and its index (ItemWithIndex<T>): equal and hashed by the item alone, as upstream’s.
ItemWithValue
An item and a value that goes with it (ItemWithValue<TObject, TValue>): equal when both parts are.
OptionElse
What if_has_value returns: runs the action of else_ when the option was empty (OptionElse).

Enums§

ConnectionStatus
The state of the connection to a sequence (ConnectionStatus), as MonitorStatus reports it.

Traits§

OptionExtensions
The extensions of an option (OptionExtensions on Optional<T>).
OptionObservableExtensions
The operators of sequences of options (OptionObservableExtensions), implemented for Rc<dyn IObservable<Option<T>>>.

Functions§

duplicates
The items whose value by value_selector is that of another item, group by group in the order of the first item of each group (Duplicates).
first_or_optional
The first item that selector accepts, or none (FirstOrOptional).
index_of_many
The items of items_to_find that are in source, with their indexes there, in the order of items_to_find (IndexOfMany(IEnumerable<T>, IEnumerable<T>)).
index_of_many_with
index_of_many with the result that result_selector makes of each item and its index (IndexOfMany(.., Func<TObject, int, TResult>)).
lookup
The value of key in source, or none (Lookup(IDictionary, TKey)).
remove_if_contained
Removes key from source; whether it was there (RemoveIfContained).
retry_with_back_off
The sequence, subscribed again after each error of type E once the delay that back_off_strategy gives for the error and the number of failures so far has passed; a None delay ends the sequence with the error (RetryWithBackOff<TSource, TException>).
schedule_recurring_action
Runs action every interval on scheduler until the result is disposed (ScheduleRecurringAction(IScheduler, TimeSpan, Action)).
schedule_recurring_action_with
Runs action after each interval that interval gives, on scheduler, until the result is disposed (ScheduleRecurringAction(IScheduler, Func<TimeSpan>, Action)).
select_values
The values of the options that have one (SelectValues(IEnumerable<Optional<T>>)).
to_unit
The sequence with each value replaced by () (ToUnit).
with_index
The items with their indexes (WithIndex).