pub struct OutputDir(PathBuf);
Expand description
An output directory that is guaranteed to be an absolute, writable directory.
Tuple Fields§
§0: PathBuf
Implementations§
Source§impl OutputDir
impl OutputDir
Sourcepub fn new(path: PathBuf) -> Result<Self, Error>
pub fn new(path: PathBuf) -> Result<Self, Error>
Creates a new OutputDir
from path
.
Creates a directory at path
if it does not exist yet.
Also creates any missing parent directories.
§Errors
Returns an error if
path
is not absolute,path
does not exist and cannot be created,- the metadata of
path
cannot be retrieved, path
is not a directory,- or
path
is only read-only.
Sourcepub fn to_path_buf(&self) -> PathBuf
pub fn to_path_buf(&self) -> PathBuf
Converts a Path to an owned PathBuf.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputDir
impl RefUnwindSafe for OutputDir
impl Send for OutputDir
impl Sync for OutputDir
impl Unpin for OutputDir
impl UnwindSafe for OutputDir
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