Struct alpm_types::StartDir
source · pub struct StartDir(AbsolutePath);
Expand description
An absolute path used as start directory in a package build environment
StartDir wraps an AbsolutePath
§Examples
use alpm_types::{StartDir, Error};
use std::str::FromStr;
// create StartDir from &str
assert_eq!(
StartDir::from_str("/").unwrap(),
StartDir::new("/").unwrap()
);
assert_eq!(
StartDir::from_str("/foo.txt").unwrap(),
StartDir::new("/foo.txt").unwrap()
);
// format as String
assert_eq!("/", format!("{}", StartDir::new("/").unwrap()));
Tuple Fields§
§0: AbsolutePath
Implementations§
Trait Implementations§
source§impl PartialEq for StartDir
impl PartialEq for StartDir
impl Eq for StartDir
impl StructuralPartialEq for StartDir
Auto Trait Implementations§
impl Freeze for StartDir
impl RefUnwindSafe for StartDir
impl Send for StartDir
impl Sync for StartDir
impl Unpin for StartDir
impl UnwindSafe for StartDir
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