ItemsView
struct · ferroui-controls · v0.5.0
struct ItemsView<'a>
The items carried by a change notification of an untyped items list: a cheap, copyable view that produces an item only when asked for it.
See the module documentation ("Change notifications").
Members
EMPTY
const EMPTY: ItemsView<'static>
A view of no items.
from_slice
const fn from_slice(items: &'a [Option<BoxedValue>]) -> Self
A view of existing untyped items.
window
fn window(list: &'a dyn IItemsList, start: usize, count: usize) -> Self
A view of count items of list starting at start. Nothing is
read from the list until an item is asked for.
of_source
fn of_source(source: &'a ItemsSource) -> Self
A view of all the items of source. Only the count is read.
of_source_range
fn of_source_range(source: &'a ItemsSource, start: usize, count: usize) -> Self
A view of count items of source starting at start.
from_typed
fn from_typed<T: PropertyValue>(items: &'a TypedItems<'a, T>) -> Self
A view of typed items, each boxed when it is read.
len
fn len(self: &Self) -> usize
The number of items. Never reads an item.
is_empty
fn is_empty(self: &Self) -> bool
Whether the view has no items. Never reads an item.
get
fn get(self: &Self, index: usize) -> Option<BoxedValue>
The item at index. Panics if out of range.
iter
fn iter(self: &Self) -> ItemsViewIter<'a>
The items, each read when the iterator reaches it.
to_vec
fn to_vec(self: &Self) -> Vec<Option<BoxedValue>>
A copy of the items. Reads every item.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClassDefaultsErasedDestructorIntoEitherCloneCopyDefaultDebugFrom<&'a [Option<Rc<dyn AnyValue>>]>From<&'a Vec<Option<Rc<dyn AnyValue>>>>From<&'a [Option<Rc<dyn AnyValue>>; N]>From<&'a ItemsSource>IntoIterator
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.