# Diagnostic

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-static-view-locator-build/diagnostics/struct-diagnostic/

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

```rust
struct Diagnostic
```

A diagnostic of the generator, with the place in the Rust source when there is one.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/StaticViewLocator/FerroUI.StaticViewLocator.Build/diagnostics.rs#L22)

## Members

- [`code`](#struct_field-code)
- [`severity`](#struct_field-severity)
- [`message`](#struct_field-message)
- [`file`](#struct_field-file)
- [`line`](#struct_field-line)
- [`cargo_line`](#function-cargo_line)

<a id="struct_field-code"></a>

### code

```rust
code: &'static str
```

`SVL0001` to `SVL0010`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/StaticViewLocator/FerroUI.StaticViewLocator.Build/diagnostics.rs#L24)

<a id="struct_field-severity"></a>

### severity

```rust
severity: Severity
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/StaticViewLocator/FerroUI.StaticViewLocator.Build/diagnostics.rs#L25)

<a id="struct_field-message"></a>

### message

```rust
message: String
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/StaticViewLocator/FerroUI.StaticViewLocator.Build/diagnostics.rs#L26)

<a id="struct_field-file"></a>

### file

```rust
file: Option<std::path::PathBuf>
```

The file, when the diagnostic is about an item of the sources.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/StaticViewLocator/FerroUI.StaticViewLocator.Build/diagnostics.rs#L28)

<a id="struct_field-line"></a>

### line

```rust
line: usize
```

The line, from 1; 0 when the diagnostic is about the file.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/StaticViewLocator/FerroUI.StaticViewLocator.Build/diagnostics.rs#L30)

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

### cargo_line

```rust
fn cargo_line(self: &Self) -> String
```

The diagnostic as a line of Cargo (`cargo::error=..` or `cargo::warning=..`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/StaticViewLocator/FerroUI.StaticViewLocator.Build/diagnostics.rs#L39)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Display`

## Availability

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