#[non_exhaustive]pub struct ProjectInput<'a> { /* private fields */ }Expand description
Process-like path inputs used to resolve a project root.
Build one with ProjectInput::new and the chainable setters. Project root
resolution is best-effort and uses a stable fallback order:
Relative command-line arguments are ignored because they cannot be resolved safely without knowing the process working directory at the time the command started.
The home-directory ceiling is not part of the input. It is configured on
StackDetector or passed to
resolve_project_root directly.
§Examples
use std::path::Path;
use what_stack::ProjectInput;
let input = ProjectInput::new()
.cwd(Path::new("/workspace/api/src"))
.exe(None);Implementations§
Source§impl<'a> ProjectInput<'a>
impl<'a> ProjectInput<'a>
Sourcepub fn cwd(self, cwd: impl Into<Option<&'a Path>>) -> Self
pub fn cwd(self, cwd: impl Into<Option<&'a Path>>) -> Self
Set the process working directory.
This is the most trustworthy project-root hint and is checked first.
Accepts a &Path or an Option<&Path>.
Trait Implementations§
Source§impl<'a> Clone for ProjectInput<'a>
impl<'a> Clone for ProjectInput<'a>
impl<'a> Copy for ProjectInput<'a>
Source§impl<'a> Debug for ProjectInput<'a>
impl<'a> Debug for ProjectInput<'a>
Auto Trait Implementations§
impl<'a> Freeze for ProjectInput<'a>
impl<'a> RefUnwindSafe for ProjectInput<'a>
impl<'a> Send for ProjectInput<'a>
impl<'a> Sync for ProjectInput<'a>
impl<'a> Unpin for ProjectInput<'a>
impl<'a> UnsafeUnpin for ProjectInput<'a>
impl<'a> UnwindSafe for ProjectInput<'a>
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