ObservableCollectionMap

Struct ObservableCollectionMap 

Source
pub struct ObservableCollectionMap<TDst: 'static + Clone> { /* private fields */ }
Expand description

ObservableCollectionMap.

Trait Implementations§

Source§

impl From<&ObservableCollectionMap<Rc<RefCell<dyn ControlObject>>>> for Box<dyn ObservableCollection<Rc<RefCell<dyn ControlObject>>>>

Source§

fn from(src: &ObservableCollectionMap<Rc<RefCell<dyn ControlObject>>>) -> Self

Converts to this type from the input type.
Source§

impl<V> From<&ObservableCollectionMap<Rc<V>>> for Box<dyn ObservableCollection<Rc<RefCell<dyn ControlObject>>>>
where V: 'static + ViewModel,

Source§

fn from(src: &ObservableCollectionMap<Rc<V>>) -> Self

Converts to this type from the input type.
Source§

impl From<ObservableCollectionMap<Rc<RefCell<dyn ControlObject>>>> for Box<dyn ObservableCollection<Rc<RefCell<dyn ControlObject>>>>

Source§

fn from(src: ObservableCollectionMap<Rc<RefCell<dyn ControlObject>>>) -> Self

Converts to this type from the input type.
Source§

impl<V> From<ObservableCollectionMap<Rc<V>>> for Box<dyn ObservableCollection<Rc<RefCell<dyn ControlObject>>>>
where V: 'static + ViewModel,

Converts ObservableCollectionMap to observable collection.

Source§

fn from(src: ObservableCollectionMap<Rc<V>>) -> Self

Converts to this type from the input type.
Source§

impl<T: 'static + Clone> ObservableCollection<T> for ObservableCollectionMap<T>

Source§

fn len(&self) -> usize

Source§

fn get(&self, index: usize) -> Option<T>

Source§

fn on_changed(&self, f: Box<dyn FnMut(VecDiff<T>)>) -> Option<Subscription>

Auto Trait Implementations§

§

impl<TDst> Freeze for ObservableCollectionMap<TDst>

§

impl<TDst> !RefUnwindSafe for ObservableCollectionMap<TDst>

§

impl<TDst> !Send for ObservableCollectionMap<TDst>

§

impl<TDst> !Sync for ObservableCollectionMap<TDst>

§

impl<TDst> Unpin for ObservableCollectionMap<TDst>

§

impl<TDst> !UnwindSafe for ObservableCollectionMap<TDst>

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, TSrcColl> ObservableCollectionExt<T> for TSrcColl
where T: 'static + Clone, TSrcColl: ObservableCollection<T> + 'static,

Source§

fn map<TDst, F>(&self, f: F) -> ObservableCollectionMap<TDst>
where TDst: 'static + Clone, F: 'static + Fn(&T) -> TDst,

Map creates new observable collection.

It keeps mapped copy of every item.

The only connection between it and original observable collection is by subscribing on the on_changed event of the source collection, so we don’t have to keep implicit reference to the source collection. The on_change event of source collection keeps a weak reference to our handler.

Source§

impl<TSrc, TSrcColl> ObservableCollectionFlatMapExt<TSrc> for TSrcColl
where TSrc: Clone + 'static, TSrcColl: ObservableCollection<TSrc> + 'static,

Source§

fn flat_map<TDst, TDstColl, F>(&self, f: F) -> ObservableCollectionFlatMap<TDst>
where TDst: Clone + 'static, TDstColl: ObservableCollection<TDst> + IntoIterator<Item = TDst>, F: FnMut(&TSrc) -> TDstColl + 'static,

Flat map creates new observable collection.

It keeps mapped copy of every item.

The only connection between it and original observable collection is by subscribing on the on_changed event of the source collection, so we don’t have to keep implicit reference to the source collection. The on_change event of source collection keeps a weak reference to our handler.

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> UnsafeAny for T
where T: Any,