ChartCollection
struct · ferroui-controls-charts · v0.5.0
struct ChartCollection<T: ObjectType>
An observable collection with transactional ownership checks. Its storage is shared by handles; snapshots remain valid during reentrant notifications.
Members
countis_emptysnapshotgetcontainsindex_ofaddinsertsetremove_atremoveclearadd_collection_changedremove_collection_changed
count
fn count(self: &Self) -> usize
is_empty
fn is_empty(self: &Self) -> bool
snapshot
fn snapshot(self: &Self) -> Rc<Vec<Ref<T>>>
get
fn get(self: &Self, index: usize) -> Result<Ref<T>, ChartError>
contains
fn contains(self: &Self, value: impl IntoRef<T>) -> bool
index_of
fn index_of(self: &Self, value: impl IntoRef<T>) -> Option<usize>
add
fn add(self: &Self, value: impl IntoRef<T>) -> Result<(), ChartError>
insert
fn insert(self: &Self, index: usize, value: impl IntoRef<T>) -> Result<(), ChartError>
set
fn set(self: &Self, index: usize, value: impl IntoRef<T>) -> Result<(), ChartError>
remove_at
fn remove_at(self: &Self, index: usize) -> Result<Ref<T>, ChartError>
remove
fn remove(self: &Self, value: impl IntoRef<T>) -> bool
clear
fn clear(self: &Self) -> Result<(), ChartError>
add_collection_changed
fn add_collection_changed(self: &Self, handler: Rc<CollectionChangedHandler<Ref<T>>>) -> u64
remove_collection_changed
fn remove_collection_changed(self: &Self, token: u64) -> bool
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherClonePartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.