Skip to content

Language record

Rust

Rust is indexed with its trait algebra intact: an impl Trait for Type becomes an implements edge, a supertrait bound becomes extends, and every method lands on the impl that owns it — so an agent can ask what a type can do.

.rs · 1 registry id · 14 of 14 relationship types

The registry row this page is generated from

Read at render time from the same family row the register reads, so nothing in this block can disagree with it.

Extensions
.rs
Registry names
rust
Recorded symbols
functions · structs · traits · modules

Relationship types this analyzer constructs

14 of 14 constructed, read from this analyzer's source and re-derived by the languages gate. Each row below is one of the engine's types, in the engine's own order.

Relationship typeConstructed
callsconstructed by this analyzer
extendsconstructed by this analyzer
implementsconstructed by this analyzer
usesconstructed by this analyzer
importsconstructed by this analyzer
exportsconstructed by this analyzer
containsconstructed by this analyzer
referencesconstructed by this analyzer
overridesconstructed by this analyzer
instantiatesconstructed by this analyzer
decoratesconstructed by this analyzer
rendersconstructed by this analyzer
mixes_inconstructed by this analyzer
part_ofconstructed by this analyzer

14 constructed, 0 not constructed. The register explains what each label means.

What this analyzer does not resolve

  • Construction is resolved in-file and deferred: Vec::new() records a call to new and no instantiation, because Vec is not declared in this file, and a bare Ok(()) never resolves to a local struct Ok — that spelling belongs to the prelude's own variant.
  • There is no override edge, and that is a fact about Rust rather than about the analyzer: a trait impl is implements, and nothing in the format says one inherent method replaces another.
  • A macro named str! is unreachable as a call target: the lexer reads it as the primitive-type keyword. 475 of the 476 affected files in the pinned corpus parse once str! is substituted with a same-length spelling.

Every line above was written against Rust’s own analyzer module and is named against a construct in it, so it can be checked against the source. Nothing here is inherited from a template, or from another language’s page.

Where you meet it in a repository

Recognised by extension — .rs. Everything below is about where those files actually sit in a working repository.

  • A Cargo workspace splits a system across member crates, so a trait and its implementers routinely sit in different directories and often different crates.
  • derive attributes and macro_rules! bodies generate code the analyzer walks as templates rather than as executed Rust.
  • Attribute macros such as #[get("/users")] put a route next to the handler, and bb records the route path as an edge so a handler can be found by URL.

Questions this index answers

Phrased as retrievals, because that is what an index can honestly do: it holds the symbols and the edges between them, and hands them back with the evidence attached.

  1. Which types implement this trait?
  2. What does this trait require of its implementers?
  3. Which methods in this impl block are trait methods, and which are inherent?
  4. Which handler serves this route path?

What the analyzer sees in code like this

A trait, the impl that satisfies it, and the struct it is written on
pub trait Handler {                       // bb records: trait Handler
    fn handle(&self, req: Request) -> Response;   // bb records: method handle
}

pub struct Router { pool: Pool }        // bb records: struct Router · field pool

impl Handler for Router {                // bb records: Router implements Handler
    fn handle(&self, req: Request) -> Response {
        self.pool.submit(req)
    }
}

Symbols are stored with the file they came from and the bytes they span, so a hit points at a line rather than at a guess. The annotations in the sample are commentary for the reader, not strings the index would store.

Languages that turn up in the same repository

Application & systems — the count beside each name is how many relationship types that family’s analyzer constructs.

The extensions, registry names, recorded symbols and relationship types above are the parser registry row for Rust, read while the page rendered — the same row the register reads, so the two surfaces cannot tell two stories. Every relationship type listed as constructed appears in src/ast/real-*, the analyzer modules bb ships. bb 0.1.0 answers from a local store over 50 languages (53 registry ids, three of them aliases). There is no benchmark on this page: every claim here is one you can go and read in the source.