pub trait GraphSource {
// Required methods
fn store(&self) -> &Connection;
fn checks_sources(&self) -> bool;
fn file_served(&self, path: &str) -> bool;
fn symbol_served(&self, path: &str, name: &str) -> bool;
fn rankable_files(
&self,
files: Vec<String>,
edges: &[(String, String)],
seeds: &[String],
) -> HashSet<String>;
}Expand description
A graph store as a whole-graph computation reads it — a ranking, a community detection, a rule scan: the rows, and the serve-time source check that decides which of them exist for the computation (G04).
CodeGraph answers with the gate of the request that opened it. A bare
Connection has no project root on record and admits everything; it is
the form of a graph that is not served from a project (in memory).
Required Methods§
Sourcefn store(&self) -> &Connection
fn store(&self) -> &Connection
The connection the rows are read from.
Sourcefn checks_sources(&self) -> bool
fn checks_sources(&self) -> bool
Whether this source asks current sources at all. false for a store
without a project root: a caller that would name several files in one
row must then leave that row to a check that can decide them.
Sourcefn file_served(&self, path: &str) -> bool
fn file_served(&self, path: &str) -> bool
Whether the file path may be used now.
Sourcefn symbol_served(&self, path: &str, name: &str) -> bool
fn symbol_served(&self, path: &str, name: &str) -> bool
Whether the symbol name of path may be used now.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl GraphSource for Connection
impl GraphSource for Connection
fn store(&self) -> &Connection
fn checks_sources(&self) -> bool
fn file_served(&self, _path: &str) -> bool
fn symbol_served(&self, _path: &str, _name: &str) -> bool
fn rankable_files( &self, files: Vec<String>, _edges: &[(String, String)], _seeds: &[String], ) -> HashSet<String>
Source§impl<T: GraphSource + ?Sized> GraphSource for &T
A reference to a source is that source (&graph where graph is already
a &CodeGraph).
impl<T: GraphSource + ?Sized> GraphSource for &T
A reference to a source is that source (&graph where graph is already
a &CodeGraph).