pub struct ResolutionInputs {
pub platform: Platform,
pub path: OsString,
pub path_extensions: OsString,
pub current_directory: PathBuf,
pub common_paths: Vec<PathBuf>,
pub own_executable: PathBuf,
}Expand description
What:
Everything resolution reads from the process,
gathered into one value.
Vec<PathBuf> is an owned list of owned paths.
Why:
Tests inject a disposable PATH and executable identity instead of mutating
the real process environment.
In TS you’d write (pseudocode):
type ResolutionInputs = { platform: Platform; path: string; pathExtensions: string;
currentDirectory: string; commonPaths: string[]; ownExecutable: string };Fields§
§platform: PlatformLookup rules to apply.
path: OsStringThe PATH value;
empty when unset.
path_extensions: OsStringThe PATHEXT value;
only read on Windows.
current_directory: PathBufDirectory that relative PATH entries are resolved against.
common_paths: Vec<PathBuf>Conventional Git locations promoted to the front when PATH exposes them.
own_executable: PathBufThis wrapper’s own executable, excluded from selection.
Trait Implementations§
Source§impl Clone for ResolutionInputs
impl Clone for ResolutionInputs
Source§impl Debug for ResolutionInputs
impl Debug for ResolutionInputs
impl Eq for ResolutionInputs
Source§impl PartialEq for ResolutionInputs
impl PartialEq for ResolutionInputs
impl StructuralPartialEq for ResolutionInputs
Auto Trait Implementations§
impl Freeze for ResolutionInputs
impl RefUnwindSafe for ResolutionInputs
impl Send for ResolutionInputs
impl Sync for ResolutionInputs
impl Unpin for ResolutionInputs
impl UnsafeUnpin for ResolutionInputs
impl UnwindSafe for ResolutionInputs
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
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> ⓘ
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 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> ⓘ
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