FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    static_view_mapping

    proc macro · ferroui-static-view-locator-macros · v0.5.0

    attr macro static_view_mapping!
    

    Maps a view model type to a view type on a locator ([StaticViewMapping(typeof(VM), typeof(V))]): the final override of the mapping of the view model, for types that do not follow the naming rules. Repeatable; the types are named as in the module of the locator.

    #[static_view_locator]
    #[static_view_mapping(LoginViewModel, LogInView)]
    #[static_view_mapping(DashboardModel, DashboardScreen)]
    pub struct ViewLocator;
    

    static_view_locator reads the mappings below it; a mapping written above it is left in place by this attribute, which only checks it.

    View source

    Availability

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