FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    GeneratorOptions

    struct · ferroui-static-view-locator-build · v0.5.0

    struct GeneratorOptions
    

    The options of the generator (GeneratorOptions).

    View source

    Members

    namespace_prefixes

    namespace_prefixes: Vec<String>
    

    The module paths view models are taken from (StaticViewLocatorViewModelNamespacePrefixes): a view model is taken when its module is one of them or below one; empty, from every module. A path is written from the crate (crate::view_models, or the name of the crate).

    Source

    include_internal_view_models

    include_internal_view_models: bool
    

    StaticViewLocatorIncludeInternalViewModels. Kept for the options of the reference and without an effect: Rust has no InternalsVisibleTo, and a view model of another crate is taken only when it is public.

    Source

    include_referenced_crates

    include_referenced_crates: bool
    

    Whether the view models of the crates the crate depends on are taken (StaticViewLocatorIncludeReferencedAssemblies): the types of their models (the .xamlmeta of the crates that export one) whose name ends with ViewModel.

    Source

    additional_view_base_types

    additional_view_base_types: Vec<String>
    

    More view base types (StaticViewLocatorAdditionalViewBaseTypes), as Rust paths from the crate (crate::controls::ToolWindowBase) or of a dependency (my_controls::Panel).

    Source

    namespace_replacement_rules

    namespace_replacement_rules: Vec<ReplacementRule>
    

    Applied in order to the module path of a view model to find the module of its view (StaticViewLocatorNamespaceReplacementRules), then DEFAULT_NAMESPACE_RULES.

    Source

    type_name_replacement_rules

    type_name_replacement_rules: Vec<ReplacementRule>
    

    Applied in order to the name of a view model to find the name of its view (StaticViewLocatorTypeNameReplacementRules), then DEFAULT_TYPE_NAME_RULES.

    Source

    strip_generic_arity_from_view_name

    strip_generic_arity_from_view_name: bool
    

    Whether the view of a generic view model is found by the name alone, whatever the generic parameters of the view (StaticViewLocatorStripGenericArityFromViewName, default true).

    Source

    interface_prefixes_to_strip

    interface_prefixes_to_strip: Vec<String>
    

    Removed from the name of a trait view model before its view is looked up (StaticViewLocatorInterfacePrefixesToStrip, default I).

    Source

    effective_namespace_rules

    fn effective_namespace_rules(self: &Self) -> Vec<ReplacementRule>
    

    The namespace rules applied in order: the configured ones, then the defaults (GetReplacementRules).

    Source

    effective_type_name_rules

    fn effective_type_name_rules(self: &Self) -> Vec<ReplacementRule>
    

    The type name rules applied in order: the configured ones, then the default.

    Source

    set

    fn set(self: &mut Self, name: &str, value: &str) -> Result<(), String>
    

    Sets the option name from its text, as the reference reads an MSBuild property: the names are the ones of the setters of StaticViewLocatorBuild (view_model_namespace_prefixes, include_internal_view_models, include_referenced_crates, additional_view_base_types, namespace_replacement_rules, type_name_replacement_rules, strip_generic_arity_from_view_name, interface_prefixes_to_strip), and the properties of the reference (StaticViewLocatorViewModelNamespacePrefixes, ..) are accepted for them. A boolean that is not true or false is the default, as bool.TryParse fails.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • Clone
    • Debug
    • StructuralPartialEq
    • PartialEq
    • Eq
    • Default

    Availability

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