# apply_source

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/hot/function-apply_source/

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

```rust
fn apply_source(file: &str, source: &str)
```

Applies `source` as the new text of `file` (its `file!()` path), as if
the file had been saved with it: for tests and tools that hold the source
themselves.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/hot.rs#L78)

## Availability

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