pub struct AnalysisTask<'a, N: Grammar, H: TaskHandle = TriggerHandle, S: SyncBuildHasher = RandomState> { /* private fields */ }Expand description
A task that grants access to the semantic features of the Analyzer.
This kind of task implements a SemanticAccess trait through which you can read particular attribute values, but you cannot change the content of the documents.
You may have as many instances of this task as needed at the same time, and you can use them from multiple threads to read the attributes. The analyzer is capable to manage the semantic graph concurrently.
Trait Implementations§
Source§impl<'a, N: Grammar, H: TaskHandle, S: SyncBuildHasher> AbstractTask<N, H, S> for AnalysisTask<'a, N, H, S>
impl<'a, N: Grammar, H: TaskHandle, S: SyncBuildHasher> AbstractTask<N, H, S> for AnalysisTask<'a, N, H, S>
Source§fn handle(&self) -> &H
fn handle(&self) -> &H
Returns a handle of the task through which you can
manually check if the task has been interrupted, and through which you
can interrupt the task manually.
Source§fn proceed(&self) -> AnalysisResult<()>
fn proceed(&self) -> AnalysisResult<()>
A convenient function that checks if the task was interrupted. Read more
Source§fn contains_doc(&self, id: Id) -> bool
fn contains_doc(&self, id: Id) -> bool
Returns true, if the analyzer has a document with the
id identifier.Source§fn read_doc(&self, id: Id) -> AnalysisResult<DocumentReadGuard<'_, N, S>>
fn read_doc(&self, id: Id) -> AnalysisResult<DocumentReadGuard<'_, N, S>>
Returns a RAII guard that provides read-only access to the analyzer’s
document with specified
id. Read moreSource§fn try_read_doc(&self, id: Id) -> Option<DocumentReadGuard<'_, N, S>>
fn try_read_doc(&self, id: Id) -> Option<DocumentReadGuard<'_, N, S>>
Returns a RAII guard that provides read-only access to the analyzer’s
document with specified
id. Read moreSource§fn is_doc_mutable(&self, id: Id) -> bool
fn is_doc_mutable(&self, id: Id) -> bool
Returns true if the document with the specified
id exists in
the analyzer, and this document allows
content edit operations.Source§fn is_doc_immutable(&self, id: Id) -> bool
fn is_doc_immutable(&self, id: Id) -> bool
Returns true if the document with the specified
id exists in
the analyzer, and this document does not allow
content edit operations.Source§fn snapshot_class(
&self,
id: Id,
class: &<N::Classifier as Classifier>::Class,
) -> AnalysisResult<Shared<HashSet<NodeRef, S>>>
fn snapshot_class( &self, id: Id, class: &<N::Classifier as Classifier>::Class, ) -> AnalysisResult<Shared<HashSet<NodeRef, S>>>
Returns a snapshot of the node references set of the document
with
id that refer to syntax tree nodes belonging to specified class. Read moreSource§fn common(&self) -> &N::CommonSemantics
fn common(&self) -> &N::CommonSemantics
Provides access to the Analyzer’s
common semantics, a special semantic
feature that is instantiated during the Analyzer’s creation. It does
not belong to any specific document and is common across the entire
Analyzer. Read more
Source§impl<'a, N: Grammar, H: TaskHandle, S: SyncBuildHasher> Drop for AnalysisTask<'a, N, H, S>
impl<'a, N: Grammar, H: TaskHandle, S: SyncBuildHasher> Drop for AnalysisTask<'a, N, H, S>
impl<'a, N: Grammar, H: TaskHandle, S: SyncBuildHasher> SemanticAccess<N, H, S> for AnalysisTask<'a, N, H, S>
Auto Trait Implementations§
impl<'a, N, H, S> Freeze for AnalysisTask<'a, N, H, S>
impl<'a, N, H, S> RefUnwindSafe for AnalysisTask<'a, N, H, S>
impl<'a, N, H, S> Send for AnalysisTask<'a, N, H, S>
impl<'a, N, H, S> Sync for AnalysisTask<'a, N, H, S>
impl<'a, N, H, S> Unpin for AnalysisTask<'a, N, H, S>
impl<'a, N, H, S> UnsafeUnpin for AnalysisTask<'a, N, H, S>
impl<'a, N, H, S> UnwindSafe for AnalysisTask<'a, N, H, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more