Skip to main content

PowerShellValidator

Struct PowerShellValidator 

Source
pub struct PowerShellValidator;

Trait Implementations§

Source§

impl SnippetValidator for PowerShellValidator

Source§

fn language(&self) -> Language

Source§

fn is_available(&self) -> bool

Source§

fn validate( &self, _snippet: &Snippet, _level: ValidationLevel, _timeout_secs: u64, ) -> Result<(SnippetStatus, Option<String>)>

Validate a snippet at the requested level. Read more
Source§

fn max_level(&self) -> ValidationLevel

Source§

fn is_available_at(&self, _level: ValidationLevel) -> bool

Source§

fn validate_in_session( &self, snippet: &Snippet, level: ValidationLevel, timeout_secs: u64, session: Option<&ValidationSession>, ) -> Result<SnippetValidation>

Source§

fn validate_batch_in_session( &self, _snippets: &[&Snippet], _level: ValidationLevel, _timeout_secs: u64, _session: Option<&ValidationSession>, ) -> Option<Result<BatchValidation>>

Source§

fn achievable_level(&self, _requested: ValidationLevel) -> ValidationLevel

The highest level this run’s environment can actually reach for requested, as opposed to max_level’s fixed per-language ceiling. A validator whose deeper levels depend on a tool that may not be installed (a real type-checker, for instance) overrides this to report the level it can genuinely back up right now; the runner treats anything below requested as a real downgrade rather than a capability ceiling, because — unlike max_level — the limit could lift on a different machine. Default: no environmental limit beyond max_level. ~keep
Source§

fn achievable_level_is_structural(&self, _requested: ValidationLevel) -> bool

Whether the gap achievable_level reports for requested is structural — no check for that level is wired up in this validator at all, on any machine — as opposed to achievable_level’s default meaning of a real tool that merely happens to be missing from this run’s environment. The runner exempts a structural gap from Downgraded the same way it exempts max_level, because it is unsatisfiable however healthy the environment is; an environmental gap keeps its Downgraded status so a genuinely broken environment is never silently waved through. Default: environmental, not structural. ~keep
Source§

fn is_dependency_error(&self, _error_output: &str) -> bool

Source§

fn requires_session_exclusivity(&self) -> bool

Whether validate_batch_in_session is genuinely wired up to run one process for many snippets, as opposed to the default trait implementation, which always returns None and lets the runner fall back to one process per snippet. The runner uses this to decide upfront whether a group is a real batch — and should be logged and dispatched as one — or should skip the batch path entirely and go straight to the per-snippet fallback. Without this, every language was logged as Starting batched snippet validation regardless of batching support, and a validator that doesn’t support it silently fell through to a codepath that log line never covered, leaving no matching Finished event. That is purely an observability gap in the batch/fallback dispatch path, not a signal about whether the validator itself ran or hung — a healthy, fully-passing language is just as silent there as a broken one. ~keep Whether two snippets of this language may run concurrently within one validation session. Read more
Source§

fn supports_batching(&self) -> bool

Source§

fn missing_session_artifacts( &self, _session: &ValidationSession, _level: ValidationLevel, ) -> Vec<PathBuf>

Build artifacts that must already be on disk before ANY snippet of this language can be validated in session at level – the files a alef build produces and a session’s manifest then points its toolchain at. A non-empty answer means every snippet claiming this session is unsatisfiable by construction, so the runner reports them once and spawns nothing (see runner::artifact_preflight). Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more