FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MarkupAssembly

    struct · ferroui-base · v0.5.0

    struct MarkupAssembly
    

    What a crate states about itself for markup: the assembly name its types are addressed by (using:Ns;assembly=FerroUI.Controls, asset URIs) and its XML namespace definitions.

    A crate declares one as a constant and registers it from its register_types() function. A type belongs to the assembly whose crate_name is the first segment of the module path of the type.

    View source

    Members

    name

    name: &'static str
    

    The assembly name (FerroUI.Controls).

    Source

    crate_name

    crate_name: &'static str
    

    The crate, as module paths spell it (ferroui_controls).

    Source

    xmlns_definitions

    xmlns_definitions: &'static [XmlnsDefinition]
    

    Source

    xmlns_prefixes

    xmlns_prefixes: &'static [XmlnsPrefix]
    

    Source

    metadata

    metadata: &'static [(&'static str, &'static str)]
    

    Key/value metadata of the assembly (the AssemblyMetadata attributes of the managed original). The markup loader reads CREATE_SOURCE_INFO.

    Source

    CREATE_SOURCE_INFO

    const CREATE_SOURCE_INFO: &'static str
    

    The metadata key that states whether markup compiled for the assembly records source information by default ("true"/"false").

    Source

    USE_COMPILED_BINDINGS_BY_DEFAULT

    const USE_COMPILED_BINDINGS_BY_DEFAULT: &'static str
    

    The metadata key that states whether {Binding} in markup of the assembly is a compiled binding by default ("True"/"False"): the FerroUseCompiledBindingsByDefault entry the build task of upstream writes into every assembly it compiles markup for, with the value of its DefaultCompileBindings. The previewer of the designer reads it.

    Source

    metadata_value

    fn metadata_value(self: &Self, key: &str) -> Option<&'static str>
    

    The value of the metadata entry key.

    Source

    compiles_bindings_by_default

    fn compiles_bindings_by_default(self: &Self) -> bool
    

    Whether {Binding} in markup of the assembly is a compiled binding by default, as the build compiles it: the entry USE_COMPILED_BINDINGS_BY_DEFAULT (true for "True" in any casing, with surrounding white space, and false for any other value), and compiled bindings, the default of the build (#603), without the entry.

    Not from upstream (#604): upstream reads false without the entry, which its build always writes. The previewer of the designer and RuntimeXamlLoaderConfiguration::for_assembly read this, so a previewed or reloaded document binds the way the built application does.

    Source

    register

    fn register(assembly: &'static MarkupAssembly)
    

    Adds an assembly to the process-wide table of assemblies. Registering an assembly again does nothing.

    Always registers. An application registers its own assembly with this function; a crate of the framework registers its assembly with register_table.

    Source

    register_table

    fn register_table(assembly: &'static MarkupAssembly)
    

    Registers the assembly of a crate of the framework, at start-up from the crate's register_types() function; as register. Without the feature type-tables the table is trimmed: this does nothing, and what only the table reaches is left out of the binary. An application registers its own assembly with register, which always registers.

    Source

    registered_assemblies

    fn registered_assemblies() -> Vec<&'static MarkupAssembly>
    

    Every registered assembly, in registration order.

    Source

    find

    fn find(name: &str) -> Option<&'static MarkupAssembly>
    

    The registered assembly named name.

    Source

    of_module

    fn of_module(module_path: &str) -> Option<&'static MarkupAssembly>
    

    The registered assembly that declares the module module_path.

    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
    • StructuralPartialEq
    • PartialEq
    • Eq

    Availability

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