# CompiledXamlLoader

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-markup-xaml/type_alias-compiledxamlloader/

**type alias** · [`ferroui-markup-xaml`](/docs/0.5.0/api/ferroui-markup-xaml/) · v0.5.0

```rust
type CompiledXamlLoader = fn(Option<&std::rc::Rc<dyn IServiceProvider>>, &str) -> Result<Option<ferroui_base::BoxedValue>, crate::XamlLoadError>
```

The loader of the compiled documents of one assembly (crate): returns
the object built from the document with the absolute URI `uri`,
`Ok(None)` if the assembly has no such document, and the load error when
building the document failed.

This is what the XAML compiler generates per crate; it stands in for
the generated `TryLoad(IServiceProvider, string)` method the managed
original finds by reflection (whose `null` is `Ok(None)` and whose
exception is the error).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup.Xaml/ferro_xaml_loader.rs#L47)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
