use crate::RepoPath;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Fields {
pub id: Option<String>,
pub title: Option<String>,
pub description: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SchemaMeta {
pub id: Option<String>,
pub type_const: Option<String>,
pub globs: Vec<String>,
pub asset_globs: Vec<String>,
pub uses: Vec<String>,
pub body_line: usize,
pub archived: super::Archived,
}
pub trait Fallback: std::fmt::Debug {
fn ids(&self, knowledge: usize, id: &str) -> Vec<RepoPath>;
fn ids_of_type(&self, knowledge: usize, type_name: &str) -> Vec<(RepoPath, String)>;
fn is_document(&self, path: &RepoPath) -> bool;
fn fields(&self, path: &RepoPath) -> Option<Fields>;
fn broken(&self, path: &RepoPath) -> bool;
fn broken_in(&self, knowledge: usize) -> Vec<RepoPath>;
fn schema_meta(&self, path: &RepoPath) -> Option<SchemaMeta>;
fn scalars_of_type(
&self,
knowledge: usize,
type_name: &str,
) -> Vec<(RepoPath, Vec<(String, String)>)>;
}