# SourceRegistration

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

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

```rust
struct SourceRegistration
```

Owns publication of one session's accepted documents. Scoped candidate sources always win.
A document can belong to only one live session on this UI thread.

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

## Members

- [`new`](#function-new)
- [`register_compiled_source`](#function-register_compiled_source)
- [`check_document`](#function-check_document)

<a id="function-new"></a>

### new

```rust
fn new(sources: &Rc<RefCell<Rc<Sources>>>) -> Result<Self, String>
```



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

<a id="function-register_compiled_source"></a>

### register_compiled_source

```rust
fn register_compiled_source(self: &Self, uri: &str, source: &str)
```

Keep the build baseline separate from accepted edits. A compiled template
retained by application code still declares its original markup.

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

<a id="function-check_document"></a>

### check_document

```rust
fn check_document(self: &Self, uri: &str) -> Result<(), String>
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Drop`

## Availability

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