Type Alias StartDirectory

Source
pub type StartDirectory = 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, StartDirectory};

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

Aliased Type§

struct StartDirectory(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 Serialize for AbsolutePath

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for AbsolutePath

Source§

impl StructuralPartialEq for AbsolutePath