FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RelativeSource

    struct · ferroui-base · v0.5.0

    struct RelativeSource
    

    Describes the location of a binding source, relative to the binding target.

    A relative source is a mutable reference object: it is created with RelativeSource::empty or RelativeSource::new, configured property by property (or with the chaining with_* forms) and shared as Rc<RelativeSource>. Handles compare by identity. A binding reads it when it is instantiated on a target.

    View source

    Members

    empty

    fn empty() -> Rc<Self>
    

    Creates a relative source in find-ancestor mode (the parameterless constructor).

    Source

    new

    fn new(mode: RelativeSourceMode) -> Rc<Self>
    

    Creates a relative source with the given mode.

    Source

    ancestor_level

    fn ancestor_level(self: &Self) -> i32
    

    The level of ancestor to look for when in find-ancestor mode. Use the default value of 1 to look for the first ancestor of the specified type.

    Source

    set_ancestor_level

    fn set_ancestor_level(self: &Self, value: i32)
    

    Sets the ancestor level. Panics if it is not positive.

    Source

    with_ancestor_level

    fn with_ancestor_level(self: Rc<Self>, value: i32) -> Rc<Self>
    

    The chaining form of set_ancestor_level.

    Source

    ancestor_type

    fn ancestor_type(self: &Self) -> Option<&'static TypeInfo>
    

    The type of ancestor to look for when in RelativeSourceMode::FindAncestor mode.

    Source

    set_ancestor_type

    fn set_ancestor_type(self: &Self, value: Option<&'static TypeInfo>)
    

    Source

    with_ancestor_type

    fn with_ancestor_type(self: Rc<Self>, value: Option<&'static TypeInfo>) -> Rc<Self>
    

    The chaining form of set_ancestor_type.

    Source

    mode

    fn mode(self: &Self) -> RelativeSourceMode
    

    A value that describes the type of relative source lookup.

    Source

    set_mode

    fn set_mode(self: &Self, value: RelativeSourceMode)
    

    Source

    with_mode

    fn with_mode(self: Rc<Self>, value: RelativeSourceMode) -> Rc<Self>
    

    The chaining form of set_mode.

    Source

    tree

    fn tree(self: &Self) -> TreeType
    

    The tree in which ancestors are looked up.

    Source

    set_tree

    fn set_tree(self: &Self, value: TreeType)
    

    Source

    with_tree

    fn with_tree(self: Rc<Self>, value: TreeType) -> Rc<Self>
    

    The chaining form of set_tree.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • Debug
    • Default
    • PartialEq
    • MarkupTyped

    Availability

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