pub struct AstPayload {
pub id: String,
pub file_name: String,
pub code: String,
pub comment: bool,
pub span: bool,
}Expand description
The payload of an Ast request.
Unknown fields are rejected with a deserialization error naming the
offending key, so a typo’d field cannot silently change request
semantics (#633). The web boundary renders that as a 400 carrying the
unknown_field error_kind token.
Fields§
§id: StringThe id associated to a request for an AST.
Optional on the wire (#645): an omitted id deserializes to the
empty string, which every downstream surface already treats as
“no correlation id”. Defaulting it stops clients eating a 400
for a field whose absence has an obvious meaning.
file_name: StringThe filename associated to a source code file
code: StringThe code to be represented as an AST
comment: boolIf true, nodes representing comments are ignored. Optional on
the wire (#645): omitting it defaults to false, matching the
bool default and the most common request shape.
span: boolIf true, the start and end positions of a node in a code
are considered. Optional on the wire (#645): omitting it defaults
to false.