Skip to main content

ObservableCollectionAdaptor

Struct ObservableCollectionAdaptor 

Source
pub struct ObservableCollectionAdaptor<T, K> { /* private fields */ }
Expand description

Applies the change sets of a cache to an observable collection, loading it with a reset above a threshold of changes (ObservableCollectionAdaptor<TObject, TKey>).

Implementations§

Source§

impl<T: Clone + PartialEq + 'static, K: Eq + Hash + Clone + 'static> ObservableCollectionAdaptor<T, K>

Source

pub fn new( refresh_threshold: usize, use_replace_for_updates: bool, reset_on_first_time_load: bool, ) -> Self

The adaptor with every part (ObservableCollectionAdaptor(int, bool, bool)).

Source

pub fn with_options(options: BindingOptions) -> Self

The adaptor with options (ObservableCollectionAdaptor(BindingOptions)).

Source

pub fn with_use_replace_for_updates(use_replace_for_updates: bool) -> Self

The defaults with the choice of replacements (ObservableCollectionAdaptor(useReplaceForUpdates: ..)).

Trait Implementations§

Source§

impl<T: Clone + PartialEq + 'static, K: Eq + Hash + Clone + 'static> Default for ObservableCollectionAdaptor<T, K>

Source§

fn default() -> Self

ObservableCollectionAdaptor(int refreshThreshold = 25, bool useReplaceForUpdates = true, bool resetOnFirstTimeLoad = true) with the defaults.

Source§

impl<T: Clone + PartialEq + 'static, K: Eq + Hash + Clone + 'static> IObservableCollectionAdaptor<T, K> for ObservableCollectionAdaptor<T, K>

Source§

fn adapt( &self, changes: &ChangeSet<T, K>, collection: &dyn IObservableCollection<T>, )

Applies changes to collection (Adapt).

Auto Trait Implementations§

§

impl<T, K> !Freeze for ObservableCollectionAdaptor<T, K>

§

impl<T, K> !RefUnwindSafe for ObservableCollectionAdaptor<T, K>

§

impl<T, K> !Sync for ObservableCollectionAdaptor<T, K>

§

impl<T, K> Send for ObservableCollectionAdaptor<T, K>
where RefCell<Cache<T, K>>: Send,

§

impl<T, K> Unpin for ObservableCollectionAdaptor<T, K>
where RefCell<Cache<T, K>>: Unpin,

§

impl<T, K> UnsafeUnpin for ObservableCollectionAdaptor<T, K>
where RefCell<Cache<T, K>>: UnsafeUnpin,

§

impl<T, K> UnwindSafe for ObservableCollectionAdaptor<T, K>
where RefCell<Cache<T, K>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.