Trait Backend
Source pub trait Backend {
type ArchiveIter<'a>: Iterator<Item = &'a Archive>
where Self: Sized;
Show 21 methods
// Required methods
fn to_any(&self) -> AnyBackend;
fn get_document(&self, uri: &DocumentURI) -> Option<Document>;
fn get_module(&self, uri: &ModuleURI) -> Option<ModuleLike>;
fn get_base_path(&self, id: &ArchiveId) -> Option<PathBuf>;
fn with_archive_or_group<R>(
&self,
id: &ArchiveId,
f: impl FnOnce(Option<&ArchiveOrGroup>) -> R,
) -> R
where Self: Sized;
fn with_archives<R>(&self, f: impl FnOnce(Self::ArchiveIter<'_>) -> R) -> R
where Self: Sized;
fn submit_triples(
&self,
in_doc: &DocumentURI,
rel_path: &str,
iter: impl Iterator<Item = Triple>,
)
where Self: Sized;
fn with_archive<R>(
&self,
id: &ArchiveId,
f: impl FnOnce(Option<&Archive>) -> R,
) -> R
where Self: Sized;
fn get_html_body(
&self,
d: &DocumentURI,
full: bool,
) -> Option<(Vec<CSS>, String)>;
fn get_html_full(&self, d: &DocumentURI) -> Option<String>;
fn get_html_fragment(
&self,
d: &DocumentURI,
range: DocumentRange,
) -> Option<(Vec<CSS>, String)>;
fn get_reference<T: Resourcable>(&self, rf: &LazyDocRef<T>) -> Result<T>
where Self: Sized;
// Provided methods
fn presenter(&self) -> StringPresenter<'_, Self>
where Self: Sized { ... }
fn get_declaration<T: DeclarationTrait>(
&self,
uri: &SymbolURI,
) -> Option<ContentReference<T>>
where Self: Sized { ... }
fn get_document_element<T: NarrationTrait>(
&self,
uri: &DocumentElementURI,
) -> Option<NarrativeReference<T>>
where Self: Sized { ... }
fn uri_of(&self, p: &Path) -> Option<DocumentURI>
where Self: Sized { ... }
fn archive_of<R>(
&self,
p: &Path,
f: impl FnMut(&LocalArchive, &str) -> R,
) -> Option<R>
where Self: Sized { ... }
fn with_local_archive<R>(
&self,
id: &ArchiveId,
f: impl FnOnce(Option<&LocalArchive>) -> R,
) -> R
where Self: Sized { ... }
fn get_notations(
&self,
uri: &SymbolURI,
) -> Option<VecSet<(DocumentElementURI, Notation)>>
where Self: Sized { ... }
fn get_var_notations(
&self,
uri: &DocumentElementURI,
) -> Option<VecSet<(DocumentElementURI, Notation)>>
where Self: Sized { ... }
fn as_checker(&self) -> AsChecker<'_, Self>
where Self: Sized { ... }
}