pub struct GetDir<'a> {
pub dir: PathBuf,
pub targets: Vec<Target<'a>>,
}Expand description
Utility to get directory.
Fields§
§dir: PathBuf§targets: Vec<Target<'a>>Implementations§
Source§impl<'a> GetDir<'a>
impl<'a> GetDir<'a>
Sourcepub fn from(get_dir: GetDir<'a>) -> Self
pub fn from(get_dir: GetDir<'a>) -> Self
Create a new GetDir instance from another GetDir instance.
Sourcepub fn directory<D: Into<PathBuf>>(self, dir: D) -> Self
pub fn directory<D: Into<PathBuf>>(self, dir: D) -> Self
Specific the directory to run the process. By default, it runs in current directory.
Sourcepub fn run(&self) -> Result<PathBuf>
pub fn run(&self) -> Result<PathBuf>
Get the first directory containing any of the specified targets.
Sourcepub fn run_reverse(&self) -> Result<PathBuf>
pub fn run_reverse(&self) -> Result<PathBuf>
Get the first directory containing any of the specified targets in reverse.
Trait Implementations§
Source§impl GetDirAsyncExt for GetDir<'_>
impl GetDirAsyncExt for GetDir<'_>
Auto Trait Implementations§
impl<'a> Freeze for GetDir<'a>
impl<'a> RefUnwindSafe for GetDir<'a>
impl<'a> Send for GetDir<'a>
impl<'a> Sync for GetDir<'a>
impl<'a> Unpin for GetDir<'a>
impl<'a> UnwindSafe for GetDir<'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