pub trait Symbol {
// Required methods
fn name(&self) -> &str;
fn kind(&self) -> &str;
fn byte_start(&self) -> usize;
fn byte_end(&self) -> usize;
fn line_start(&self) -> usize;
fn line_end(&self) -> usize;
fn col_start(&self) -> usize;
fn col_end(&self) -> usize;
fn fully_qualified(&self) -> &str;
fn language(&self) -> Language;
}Expand description
Common trait that all language-specific symbols implement.
This trait provides access to the common properties shared across all languages:
- Name (local and fully qualified)
- Byte and line/column spans
- Language identification
Required Methods§
Sourcefn byte_start(&self) -> usize
fn byte_start(&self) -> usize
Get the start byte offset.
Sourcefn line_start(&self) -> usize
fn line_start(&self) -> usize
Get the start line (1-based).
Sourcefn fully_qualified(&self) -> &str
fn fully_qualified(&self) -> &str
Get the fully qualified name (e.g., module::foo).