pub struct Config { /* private fields */ }
Expand description
Configuration for wdl-analysis
.
This type is a wrapper around an Arc
, and so can be cheaply cloned and
sent between threads.
Implementations§
Source§impl Config
impl Config
Sourcepub fn diagnostics_config(&self) -> &DiagnosticsConfig
pub fn diagnostics_config(&self) -> &DiagnosticsConfig
Get this configuration’s DiagnosticsConfig
.
Sourcepub fn fallback_version(&self) -> Option<SupportedVersion>
pub fn fallback_version(&self) -> Option<SupportedVersion>
Get this configuration’s fallback version; see
Config::with_fallback_version()
.
Sourcepub fn ignore_filename(&self) -> Option<&str>
pub fn ignore_filename(&self) -> Option<&str>
Get this configuration’s ignore filename.
Sourcepub fn with_diagnostics_config(&self, diagnostics: DiagnosticsConfig) -> Self
pub fn with_diagnostics_config(&self, diagnostics: DiagnosticsConfig) -> Self
Return a new configuration with the previous DiagnosticsConfig
replaced by the argument.
Sourcepub fn with_fallback_version(
&self,
fallback_version: Option<SupportedVersion>,
) -> Self
pub fn with_fallback_version( &self, fallback_version: Option<SupportedVersion>, ) -> Self
Return a new configuration with the previous version fallback option replaced by the argument.
This option controls what happens when analyzing a WDL document with a
syntactically valid but unrecognized version in the version
statement. The default value is None
, with no fallback behavior.
Configured with Some(fallback_version)
, analysis will proceed as
normal if the version statement contains a recognized version. If
the version is unrecognized, analysis will continue as if the
version statement contained fallback_version
, though the concrete
syntax of the version statement will remain unchanged.
§Warnings
This option is intended only for situations where unexpected behavior
due to unsupported syntax is acceptable, such as when providing
best-effort editor hints via wdl-lsp
. The semantics of executing a
WDL workflow with an unrecognized version is undefined and not
recommended.
Once this option has been configured for an Analyzer
, it should not be
changed. A document that was initially parsed and analyzed with one
fallback option may cause errors if subsequent operations are
performed with a different fallback option.
Sourcepub fn with_ignore_filename(&self, filename: Option<String>) -> Self
pub fn with_ignore_filename(&self, filename: Option<String>) -> Self
Return a new configuration with the previous ignore filename replaced by the argument.
Specifying None
for filename
disables ignore behavior. This is also
the default.
Some(filename)
will use filename
as the ignorefile basename to
search for. Child directories and parent directories are searched
for a file with the same basename as filename
and if a match is
found it will attempt to be parsed as an ignorefile with a syntax
similar to .gitignore
files.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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