Struct wdl_analysis::AnalysisEngine
source · pub struct AnalysisEngine { /* private fields */ }Expand description
Represents a Workflow Description Language (WDL) analysis engine.
By default, analysis parses documents, performs validation checks, resolves imports, and performs type checking.
Each analysis operation is processed in order of request; however, the individual parsing, resolution, and analysis of documents is performed across a thread pool.
Implementations§
source§impl AnalysisEngine
impl AnalysisEngine
sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Creates a new analysis engine using a default validator.
The engine must be constructed from the context of a Tokio runtime.
sourcepub fn new_with_validator<V>(validator: V) -> Result<Self>
pub fn new_with_validator<V>(validator: V) -> Result<Self>
Creates a new analysis engine with the given function that produces a validator to use.
The provided function will be called once per worker thread to initialize a thread-local validator.
The engine must be constructed from the context of a Tokio runtime.
sourcepub async fn analyze(&self, path: &Path) -> Vec<AnalysisResult>
pub async fn analyze(&self, path: &Path) -> Vec<AnalysisResult>
Analyzes the given file system path.
If the path is a directory, the directory will be recursively searched
for files with a .wdl extension to analyze.
Otherwise, a single file is analyzed.
sourcepub async fn analyze_with_progress<F>(
&self,
path: &Path,
progress: F,
) -> Vec<AnalysisResult>
pub async fn analyze_with_progress<F>( &self, path: &Path, progress: F, ) -> Vec<AnalysisResult>
Analyzes the given file system path and reports progress to the given callback.
If the path is a directory, the directory will be recursively searched
for files with a .wdl extension to analyze.
Otherwise, a single file is analyzed.
Progress is reported to the provided callback function with a minimum 50ms interval.
sourcepub fn result(&self, path: &Path) -> Option<AnalysisResult>
pub fn result(&self, path: &Path) -> Option<AnalysisResult>
Gets a previous analysis result for a file.
Returns None if the file has not been analyzed yet.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AnalysisEngine
impl !RefUnwindSafe for AnalysisEngine
impl Send for AnalysisEngine
impl Sync for AnalysisEngine
impl Unpin for AnalysisEngine
impl !UnwindSafe for AnalysisEngine
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more