FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompiledBindingPath

    struct · ferroui-base · v0.5.0

    struct CompiledBindingPath
    

    The path of a compiled binding: a sequence of typed accessors, built without any lookup by name.

    A path is a reference object: clones refer to the same path and compare by identity.

    View source

    Members

    new

    fn new() -> Self
    

    An empty path: binds to the source itself.

    Source

    elements

    fn elements(self: &Self) -> impl ExactSizeIterator<Item = CompiledBindingPathElement<'_>> + '_
    

    The elements of the path, in order (the Elements of the managed original, as a read-only view).

    Source

    element

    fn element(self: &Self, index: usize) -> Option<CompiledBindingPathElement<'_>>
    

    The element at index.

    Source

    len

    fn len(self: &Self) -> usize
    

    The number of elements in the path.

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Source

    event_handler

    fn event_handler(self: &Self) -> Option<Rc<PathEventHandler>>
    

    The method of an event binding the path ends with (CompiledBindingPathBuilder::event_handler).

    Source

    read_once

    fn read_once(self: &Self, root: &BoxedValue) -> Result<Option<BoxedValue>, String>
    

    Reads the value of the path from root once, without following it: what an event binding of {x:Bind} calls its method on when the event is raised. A path without nodes (none, or only the method of an event binding) is root itself. Err says why the path could not be read (a null in its middle, a failure).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ToString
    • ErasedDestructor
    • IntoEither
    • Clone
    • Default
    • PartialEq
    • Display
    • MarkupTyped

    Availability

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