pub trait DocumentProcessor {
type Error;
// Required method
fn process(
&mut self,
state: &EditorStateManager,
) -> Result<Vec<ProcessingEdit>, Self::Error>;
}Expand description
A generic processor that produces ProcessingEdits for an editor document.
Required Associated Types§
Sourcetype Error
type Error
The error type returned by DocumentProcessor::process.
Required Methods§
Sourcefn process(
&mut self,
state: &EditorStateManager,
) -> Result<Vec<ProcessingEdit>, Self::Error>
fn process( &mut self, state: &EditorStateManager, ) -> Result<Vec<ProcessingEdit>, Self::Error>
Compute derived state updates to apply to the editor.
Implementations should avoid mutating state; instead, return edits that the caller can
apply (e.g. via EditorStateManager::apply_processing_edits).