alpm_types::path

Type Alias StartDir

source
pub type StartDir = AbsolutePath;
Expand description

An absolute path used as start directory in a package build environment

This is a type alias for AbsolutePath

§Examples

use std::str::FromStr;

use alpm_types::{Error, StartDir};

// Create StartDir from &str and format it
assert_eq!(
    "/etc",
    StartDir::from_str("/etc")?.to_string()
);

Aliased Type§

struct StartDir(PathBuf);

Fields§

§0: PathBuf

Implementations

source§

impl AbsolutePath

source

pub fn new(path: PathBuf) -> Result<AbsolutePath, Error>

Create a new AbsolutePath

source

pub fn inner(&self) -> &Path

Return a reference to the inner type

Trait Implementations

source§

impl Clone for AbsolutePath

source§

fn clone(&self) -> AbsolutePath

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AbsolutePath

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AbsolutePath

source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl FromStr for AbsolutePath

source§

fn from_str(s: &str) -> Result<AbsolutePath, Self::Err>

Parses an absolute path from a string

§Errors

Returns an error if the path is not absolute

source§

type Err = Error

The associated error which can be returned from parsing.
source§

impl PartialEq for AbsolutePath

source§

fn eq(&self, other: &AbsolutePath) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for AbsolutePath

source§

impl StructuralPartialEq for AbsolutePath