DeclWrapperOutput

struct DeclWrapperOutput

The service boundary for declaration wrapper macros. A replacement carries the already-parsed canonical outcome, exactly like ExprMacroOutput; removed reports the intentional no-declaration result distinctly from failure.

Properties

let source: String

The replacement declaration source, empty for removal or failure.

let outcome: ParseOutcome?

The parsed replacement declaration, present only after successful replacement.

let metadata: SyntaxMetadataOutput

Identifier provenance and hygiene records for the replacement source.

let removed: Bool

Whether the wrapper removed its target declaration.

let failure_code: String?

A stable failure code, when the operation failed.

let failure_message: String?

A human-readable failure description, when the operation failed.

let failure_start: Int

The inclusive starting byte offset of the failure.

let failure_end: Int

The exclusive ending byte offset of the failure.