pub trait LocalBackend {
type ArchiveIter<'a>: IntoIterator<Item = &'a Archive>
where Self: Sized;
Show 28 methods
// Required methods
fn get_document(&self, uri: &DocumentUri) -> Result<Document, BackendError>;
fn get_document_async<A: AsyncEngine>(
&self,
uri: &DocumentUri,
) -> impl Future<Output = Result<Document, BackendError>> + Send + use<Self, A>
where Self: Sized;
fn get_module(&self, uri: &ModuleUri) -> Result<ModuleLike, BackendError>;
fn get_module_async<A: AsyncEngine>(
&self,
uri: &ModuleUri,
) -> impl Future<Output = Result<ModuleLike, BackendError>> + Send + use<Self, A>
where Self: Sized;
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 with_archive<R>(
&self,
id: &ArchiveId,
f: impl FnOnce(Option<&Archive>) -> R,
) -> R
where Self: Sized;
fn get_html_body(
&self,
d: &DocumentUri,
) -> Result<(Box<[Css]>, Box<str>), BackendError>;
fn get_html_body_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>
where Self: Sized;
fn get_html_body_inner(
&self,
d: &DocumentUri,
) -> Result<(Box<[Css]>, Box<str>), BackendError>;
fn get_html_body_inner_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>
where Self: Sized;
fn get_html_full(&self, d: &DocumentUri) -> Result<Box<str>, BackendError>;
fn get_html_fragment(
&self,
d: &DocumentUri,
range: DocumentRange,
) -> Result<(Box<[Css]>, Box<str>), BackendError>;
fn get_html_fragment_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
range: DocumentRange,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>
where Self: Sized;
fn get_reference<T: Decode<()>>(
&self,
rf: &DocDataRef<T>,
) -> Result<T, BackendError>
where Self: Sized;
fn save(
&self,
in_doc: &DocumentUri,
rel_path: Option<&UriPath>,
log: FileOrString,
from: BuildTargetId,
result: Option<Box<dyn Artifact>>,
) -> Result<(), ArtifactSaveError>;
fn get_notations<E: AsyncEngine>(
&self,
uri: &SymbolUri,
) -> impl Iterator<Item = (DocumentElementUri, Notation)>
where Self: Sized;
fn get_var_notations<E: AsyncEngine>(
&self,
uri: &DocumentElementUri,
) -> impl Iterator<Item = (DocumentElementUri, Notation)>
where Self: Sized;
// Provided methods
fn get_declaration<T: IsDeclaration>(
&self,
uri: &SymbolUri,
) -> Result<SharedDeclaration<T>, BackendError>
where Self: Sized { ... }
fn get_document_element(
&self,
uri: &DocumentElementUri,
) -> Result<SharedDocumentElement<DocumentElement>, BackendError>
where Self: Sized { ... }
async fn get_document_element_async<A: AsyncEngine>(
&self,
uri: &DocumentElementUri,
) -> Result<SharedDocumentElement<DocumentElement>, BackendError>
where Self: Sized { ... }
fn get_typed_document_element<T: IsDocumentElement>(
&self,
uri: &DocumentElementUri,
) -> Result<SharedDocumentElement<T>, BackendError>
where Self: Sized { ... }
async fn get_typed_document_element_async<A: AsyncEngine, T: IsDocumentElement>(
&self,
uri: &DocumentElementUri,
) -> Result<SharedDocumentElement<T>, BackendError>
where Self: Sized { ... }
fn uri_of(&self, p: &Path) -> Option<DocumentUri>
where Self: Sized { ... }
fn archive_of_source<R>(
&self,
p: &Path,
f: impl FnMut(&LocalArchive, RelPath<'_>) -> R,
) -> Option<R>
where Self: Sized { ... }
fn archive_of<R>(
&self,
p: &Path,
f: impl FnMut(&LocalArchive, RelPath<'_>) -> 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 with_buildable_archive<R>(
&self,
id: &ArchiveId,
f: impl FnOnce(Option<&dyn BuildableArchive>) -> R,
) -> R
where Self: Sized { ... }
}Required Associated Typesยง
type ArchiveIter<'a>: IntoIterator<Item = &'a Archive> where Self: Sized
Required Methodsยง
Sourcefn get_document(&self, uri: &DocumentUri) -> Result<Document, BackendError>
fn get_document(&self, uri: &DocumentUri) -> Result<Document, BackendError>
ยงErrors
Sourcefn get_document_async<A: AsyncEngine>(
&self,
uri: &DocumentUri,
) -> impl Future<Output = Result<Document, BackendError>> + Send + use<Self, A>where
Self: Sized,
fn get_document_async<A: AsyncEngine>(
&self,
uri: &DocumentUri,
) -> impl Future<Output = Result<Document, BackendError>> + Send + use<Self, A>where
Self: Sized,
ยงErrors
Sourcefn get_module(&self, uri: &ModuleUri) -> Result<ModuleLike, BackendError>
fn get_module(&self, uri: &ModuleUri) -> Result<ModuleLike, BackendError>
ยงErrors
Sourcefn get_module_async<A: AsyncEngine>(
&self,
uri: &ModuleUri,
) -> impl Future<Output = Result<ModuleLike, BackendError>> + Send + use<Self, A>where
Self: Sized,
fn get_module_async<A: AsyncEngine>(
&self,
uri: &ModuleUri,
) -> impl Future<Output = Result<ModuleLike, BackendError>> + Send + use<Self, A>where
Self: Sized,
ยงErrors
fn with_archive_or_group<R>(
&self,
id: &ArchiveId,
f: impl FnOnce(Option<&ArchiveOrGroup>) -> R,
) -> Rwhere
Self: Sized,
fn with_archives<R>(&self, f: impl FnOnce(Self::ArchiveIter<'_>) -> R) -> Rwhere
Self: Sized,
fn with_archive<R>(
&self,
id: &ArchiveId,
f: impl FnOnce(Option<&Archive>) -> R,
) -> Rwhere
Self: Sized,
Sourcefn get_html_body(
&self,
d: &DocumentUri,
) -> Result<(Box<[Css]>, Box<str>), BackendError>
fn get_html_body( &self, d: &DocumentUri, ) -> Result<(Box<[Css]>, Box<str>), BackendError>
ยงErrors
Sourcefn get_html_body_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>where
Self: Sized,
fn get_html_body_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>where
Self: Sized,
ยงErrors
Sourcefn get_html_body_inner(
&self,
d: &DocumentUri,
) -> Result<(Box<[Css]>, Box<str>), BackendError>
fn get_html_body_inner( &self, d: &DocumentUri, ) -> Result<(Box<[Css]>, Box<str>), BackendError>
ยงErrors
Sourcefn get_html_body_inner_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>where
Self: Sized,
fn get_html_body_inner_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>where
Self: Sized,
ยงErrors
Sourcefn get_html_full(&self, d: &DocumentUri) -> Result<Box<str>, BackendError>
fn get_html_full(&self, d: &DocumentUri) -> Result<Box<str>, BackendError>
ยงErrors
Sourcefn get_html_fragment(
&self,
d: &DocumentUri,
range: DocumentRange,
) -> Result<(Box<[Css]>, Box<str>), BackendError>
fn get_html_fragment( &self, d: &DocumentUri, range: DocumentRange, ) -> Result<(Box<[Css]>, Box<str>), BackendError>
ยงErrors
Sourcefn get_html_fragment_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
range: DocumentRange,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>where
Self: Sized,
fn get_html_fragment_async<A: AsyncEngine>(
&self,
d: &DocumentUri,
range: DocumentRange,
) -> impl Future<Output = Result<(Box<[Css]>, Box<str>), BackendError>> + Send + use<Self, A>where
Self: Sized,
ยงErrors
Sourcefn get_reference<T: Decode<()>>(
&self,
rf: &DocDataRef<T>,
) -> Result<T, BackendError>where
Self: Sized,
fn get_reference<T: Decode<()>>(
&self,
rf: &DocDataRef<T>,
) -> Result<T, BackendError>where
Self: Sized,
ยงErrors
Sourcefn save(
&self,
in_doc: &DocumentUri,
rel_path: Option<&UriPath>,
log: FileOrString,
from: BuildTargetId,
result: Option<Box<dyn Artifact>>,
) -> Result<(), ArtifactSaveError>
fn save( &self, in_doc: &DocumentUri, rel_path: Option<&UriPath>, log: FileOrString, from: BuildTargetId, result: Option<Box<dyn Artifact>>, ) -> Result<(), ArtifactSaveError>
ยงErrors
fn get_notations<E: AsyncEngine>(
&self,
uri: &SymbolUri,
) -> impl Iterator<Item = (DocumentElementUri, Notation)>where
Self: Sized,
Available on crate feature
rdf only.fn get_var_notations<E: AsyncEngine>(
&self,
uri: &DocumentElementUri,
) -> impl Iterator<Item = (DocumentElementUri, Notation)>where
Self: Sized,
Available on crate feature
rdf only.