FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Samples

    struct · ferroui-controls-charts · v0.5.0

    struct Samples
    

    One dimension's values. The same instance can be shared by multiple series.

    ItemsSource preserves arbitrary boxed values. Supported collections use the existing FerroUI adapters, including live Rc<FerroList<T>>; unsupported objects produce an empty view. Source changes invalidate a lazily decoded snapshot. No chart owns a Samples object, and change subscriptions capture only weak references.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<Samples>
    

    Returns a strong reference to this object.

    Source

    items_source_property

    fn items_source_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    The underlying, optionally observable FerroUI item source.

    Source

    construct

    fn construct() -> Self
    

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    from_values

    fn from_values<T: PropertyValue>(values: impl IntoIterator<Item = T>) -> Ref<Self>
    

    Source

    from_source

    fn from_source(source: ItemsSource) -> Ref<Self>
    

    Source

    items_source

    fn items_source(self: &Self) -> Option<BoxedValue>
    

    The original source object, including unsupported values. Unsupported scalar objects remain readable here and produce an empty chart view.

    Source

    set_items_source

    fn set_items_source(self: &Self, source: Option<BoxedValue>)
    

    Source

    set_source

    fn set_source(self: &Self, source: Option<ItemsSource>)
    

    Assign an existing FerroUI collection adapter without boxing it at the call site.

    Source

    source

    fn source(self: &Self) -> Option<ItemsSource>
    

    Resolve the source through FerroUI's normal collection conversions. This also permits model collection types registered with ItemsSource::register_binding_conversion to be used in bindings.

    Source

    view

    fn view(self: &Self) -> Rc<ItemsSourceView>
    

    Standard FerroUI view of the current source.

    Source

    count

    fn count(self: &Self) -> usize
    

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Source

    get_at

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

    Raw source item; None for an out-of-range index or a null item.

    Source

    value_at

    fn value_at(self: &Self, index: usize) -> Option<SampleValue>
    

    Decoded item. Unsupported/null values remain gaps rather than shifting indexes.

    Source

    snapshot

    fn snapshot(self: &Self) -> Rc<[Option<SampleValue>]>
    

    A shared snapshot, decoded once per revision and reused by every consumer.

    Source

    revision

    fn revision(self: &Self) -> u64
    

    Source

    add_changed

    fn add_changed(self: &Self, handler: Rc<dyn Fn() -> ()>) -> u64
    

    Observe both source replacement and changes within a notifying source.

    Source

    remove_changed

    fn remove_changed(self: &Self, token: u64) -> bool
    

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.