# CatalogCompiler

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-protranslate-build/struct-catalogcompiler/

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

```rust
struct CatalogCompiler
```

Framework-independent compiler usable in build scripts, editors and CI tools.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Build/compiler.rs#L114)

## Members

- [`new`](#function-new)
- [`notify_properties`](#function-notify_properties)
- [`add_catalog`](#function-add_catalog)
- [`add_key_list`](#function-add_key_list)
- [`add_usage`](#function-add_usage)
- [`add_rust_source`](#function-add_rust_source)
- [`compile`](#function-compile)

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

### new

```rust
fn new() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Build/compiler.rs#L123)

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

### notify_properties

```rust
fn notify_properties(self: &mut Self, enabled: bool) -> &mut Self
```

Emit the native `INotifyPropertyChanged` contract for typed property bindings.
The consuming crate must depend on `ferroui-system` when enabled.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Build/compiler.rs#L129)

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

### add_catalog

```rust
fn add_catalog(self: &mut Self, catalog: CatalogInput) -> &mut Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Build/compiler.rs#L134)

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

### add_key_list

```rust
fn add_key_list(self: &mut Self, name: impl Into<String>, content: impl Into<String>) -> &mut Self
```

Blank lines and lines beginning with `#` are ignored, like upstream key lists.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Build/compiler.rs#L140)

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

### add_usage

```rust
fn add_usage(self: &mut Self, usage: KeyUsage) -> &mut Self
```

Validate a resolved key reference; callers with semantic information can use this
instead of the explicitly scoped Rust syntax scanner.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Build/compiler.rs#L151)

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

### add_rust_source

```rust
fn add_rust_source(self: &mut Self, name: &str, source: &str, options: &SourceAnalysisOptions) -> &mut Self
```

Analyze only the receivers selected in `options`; unrelated `.format` calls
are never treated as localization calls merely because the name matches.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Build/compiler.rs#L158)

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

### compile

```rust
fn compile(self: &Self) -> Compilation
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/ProTranslate/FerroUI.ProTranslate.Build/compiler.rs#L170)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `Default`

## Availability

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