pub struct LazyValidator { /* private fields */ }Expand description
Lazy validator that wraps ass-core’s ScriptAnalysis
Provides on-demand validation with caching and incremental updates as specified in the architecture (line 164).
Implementations§
Source§impl LazyValidator
impl LazyValidator
Sourcepub fn with_config(config: ValidatorConfig) -> Self
pub fn with_config(config: ValidatorConfig) -> Self
Create a new lazy validator with custom configuration
Sourcepub fn validate(
&mut self,
document: &EditorDocument,
) -> Result<&ValidationResult>
pub fn validate( &mut self, document: &EditorDocument, ) -> Result<&ValidationResult>
Validate document using ass-core’s ScriptAnalysis
Sourcepub fn force_validate(
&mut self,
document: &EditorDocument,
) -> Result<&ValidationResult>
pub fn force_validate( &mut self, document: &EditorDocument, ) -> Result<&ValidationResult>
Force validation even if cached result exists
Sourcepub fn is_valid(&mut self, document: &EditorDocument) -> Result<bool>
pub fn is_valid(&mut self, document: &EditorDocument) -> Result<bool>
Check if document is valid (quick check using cache if available)
Sourcepub fn cached_result(&self) -> Option<&ValidationResult>
pub fn cached_result(&self) -> Option<&ValidationResult>
Get cached validation result without revalidating
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear validation cache
Sourcepub fn set_config(&mut self, config: ValidatorConfig)
pub fn set_config(&mut self, config: ValidatorConfig)
Update configuration
Trait Implementations§
Source§impl Debug for LazyValidator
impl Debug for LazyValidator
Auto Trait Implementations§
impl Freeze for LazyValidator
impl RefUnwindSafe for LazyValidator
impl Send for LazyValidator
impl Sync for LazyValidator
impl Unpin for LazyValidator
impl UnwindSafe for LazyValidator
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