FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    On

    struct · ferroui-markup-xaml · v0.5.0

    struct On<TReturn = ferroui_base::BoxedValue>
    

    One branch of an option markup extension in element syntax:

    <OnPlatform>
      <On Options="Windows, Linux">..</On>
    </OnPlatform>
    

    TReturn is the type of the value; the non-generic form of the managed original is On with its default type argument (any value).

    View source

    Members

    new

    fn new() -> Rc<Self>
    

    Source

    options

    fn options(self: &Self) -> Vec<String>
    

    The options this branch applies to.

    Source

    add_option

    fn add_option(self: &Self, option: impl Into<String>)
    

    Adds an option (the list of the managed original is filled by the markup compiler).

    Source

    content

    fn content(self: &Self) -> Option<TReturn>
    

    The value of the branch.

    Source

    set_content

    fn set_content(self: &Self, value: Option<TReturn>)
    

    Source

    Trait implementations

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

    Availability

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