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.
Members
namecrate_namexmlns_definitionsxmlns_prefixesmetadataCREATE_SOURCE_INFOUSE_COMPILED_BINDINGS_BY_DEFAULTmetadata_valuecompiles_bindings_by_defaultregisterregister_tableregistered_assembliesfindof_module
name
name: &'static str
The assembly name (FerroUI.Controls).
crate_name
crate_name: &'static str
The crate, as module paths spell it (ferroui_controls).
xmlns_definitions
xmlns_definitions: &'static [XmlnsDefinition]
xmlns_prefixes
xmlns_prefixes: &'static [XmlnsPrefix]
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.
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").
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.
metadata_value
fn metadata_value(self: &Self, key: &str) -> Option<&'static str>
The value of the metadata entry key.
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.
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.
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.
registered_assemblies
fn registered_assemblies() -> Vec<&'static MarkupAssembly>
Every registered assembly, in registration order.
find
fn find(name: &str) -> Option<&'static MarkupAssembly>
The registered assembly named name.
of_module
fn of_module(module_path: &str) -> Option<&'static MarkupAssembly>
The registered assembly that declares the module module_path.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAnyValueClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherDebugStructuralPartialEqPartialEqEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.