RuntimeXamlLoaderConfiguration
struct · ferroui-markup-xaml · v0.5.0
struct RuntimeXamlLoaderConfiguration
How the runtime XAML loader loads a document.
Members
local_assemblyuse_compiled_bindings_by_defaultdesign_modediagnostic_handlernewfor_assemblycreate_source_infoset_create_source_info
local_assembly
local_assembly: Option<&'static ferroui_base::metadata::MarkupAssembly>
The assembly (crate) the document belongs to: names without an assembly resolve against it first.
use_compiled_bindings_by_default
use_compiled_bindings_by_default: bool
Whether {Binding} is a compiled binding unless the document says
otherwise. Default is false, as upstream; a configuration for the
documents of an application (for_assembly)
takes it from the assembly, as the build does.
design_mode
design_mode: bool
Whether the document is loaded for a designer. Default is false.
diagnostic_handler
diagnostic_handler: Option<XamlDiagnosticFunc>
Receives the diagnostics of the loader and may change their severity. Without a handler, errors fail the load and warnings are ignored.
new
fn new() -> Self
for_assembly
fn for_assembly(assembly: &'static MarkupAssembly) -> Self
A configuration for the documents of assembly (its
local_assembly), whose {Binding} compiles as
the build compiles the documents of the assembly: compiled bindings,
unless the metadata of the assembly states otherwise
(MarkupAssembly::compiles_bindings_by_default).
Not from upstream (#604): the configuration a run-time load of a document of an application starts from (hot reload, the previewer of the designer, a test that loads the documents of a sample), so that the document binds as the built application does.
create_source_info
fn create_source_info(self: &Self) -> bool
Whether source information (document, line, position) is attached to the objects the loader creates.
When it was not set explicitly, the default comes from the metadata
of the local assembly (MarkupAssembly::CREATE_SOURCE_INFO, parsed
as a boolean); it is false without a local assembly, without the
entry and for a value that is not a boolean.
set_create_source_info
fn set_create_source_info(self: &mut Self, value: bool)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClassDefaultsErasedDestructorIntoEitherCloneDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.