# with_sources

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-markup-xaml/source_overlay/function-with_sources/

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

```rust
fn with_sources<T>(sources: std::rc::Rc<Sources>, action: impl FnOnce() -> T) -> T
```

Restores the prior snapshot on normal return and unwind. Never transfers UI objects across threads.

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

## Availability

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