Skip to main content

IBindableList

Trait IBindableList 

Source
pub trait IBindableList {
    // Required methods
    fn count(&self) -> usize;
    fn get_item(&self, index: usize) -> Option<BoxedValue>;
    fn set_item(&self, index: usize, value: &BoxedValue) -> bool;
    fn as_notify_collection_changed(
        &self,
    ) -> Option<&dyn INotifyCollectionChanged>;

    // Provided method
    fn item_type(&self) -> ValueType { ... }
}
Expand description

Untyped indexed access to a list, for bindings with an indexer in their path (Items[2]).

Required Methods§

Source

fn count(&self) -> usize

The number of items.

Source

fn get_item(&self, index: usize) -> Option<BoxedValue>

The item at index as an untyped value, or None if out of range.

Source

fn set_item(&self, index: usize, value: &BoxedValue) -> bool

Replaces the item at index. Returns false if the index is out of range, the list is read-only or the value is of the wrong type.

Source

fn as_notify_collection_changed(&self) -> Option<&dyn INotifyCollectionChanged>

The change notifications of the list, if it is a notifying list.

Provided Methods§

Source

fn item_type(&self) -> ValueType

The type of the items.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§