SyntaxResult

struct SyntaxResult<Category>

A category-checked syntax value or its construction failure.

Exactly one of value and failure is expected to be present. This differs from ordinary Result only to keep the procedural-macro service ABI flat and easy to serialize across the compiler boundary.

Properties

let value: Syntax<Category>?

The validated syntax when the operation succeeded.

let failure: SyntaxFailure?

The structured failure when validation failed.

Methods

consuming func into_value() -> Syntax<Category>?

Extracts the successful syntax and discards any failure information.

Inspect failure before consuming the envelope when diagnostics matter.

View Source
pub consuming func into_value() -> Syntax<Category>? {
	self.value
}