pub struct InputDir(PathBuf);
Expand description
An input directory that is guaranteed to be an absolute directory.
Tuple Fields§
§0: PathBuf
Implementations§
Trait Implementations§
Source§impl TryFrom<InputDir> for PackageInput
impl TryFrom<InputDir> for PackageInput
Source§fn try_from(value: InputDir) -> Result<Self, Self::Error>
fn try_from(value: InputDir) -> Result<Self, Self::Error>
Creates a PackageInput
from input directory path
.
This function reads ALPM-MTREE, BUILDINFO and PKGINFO files in path
, collects the
path of an existing alpm-install-scriptlet and validates them.
All data files below path
are then checked against the ALPM-MTREE data.
§Errors
Returns an error if
value
is not a validInputDir
,- there is no valid BUILDINFO file,
- there is no valid ALPM-MTREE file,
- there is no valid PKGINFO file,
- or one of the files below
dir
does not match the ALPM-MTREE data.
Auto Trait Implementations§
impl Freeze for InputDir
impl RefUnwindSafe for InputDir
impl Send for InputDir
impl Sync for InputDir
impl Unpin for InputDir
impl UnwindSafe for InputDir
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