pub struct Symbol {
pub name: String,
pub kind: SymbolKind,
pub start_line: usize,
pub end_line: usize,
pub owner: Option<String>,
}Expand description
A defined symbol with its in-file location (1-based line numbers).
Path-agnostic (ADR 0012): a symbol carries no file path, so the same
file content produces byte-identical slices regardless of where it lives,
and content-addressed storage dedups them across paths/worktrees. The path
is supplied at assembly from the manifest — see Located.
Fields§
§name: String§kind: SymbolKind§start_line: usize§end_line: usize§owner: Option<String>The type or module this symbol is defined inside — Foo for a method in
impl Foo, Widget for a method in class Widget, util for a
function in an inline mod util.
Without it Foo::get and Bar::get are one node, because a symbol’s
identity is its bare name. Paired with Reference::qualifier it lets
the resolver keep two same-named methods apart with no type inference
(#248). Omitted from the serialized slice when absent, so a file of
plain free functions keeps the byte-identical slice — and therefore the
same content hash — it had before this field existed.