Struct contract_build::ManifestPath
source · pub struct ManifestPath { /* private fields */ }Expand description
Path to a Cargo.toml file
Implementations§
source§impl ManifestPath
impl ManifestPath
sourcepub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn new<P: AsRef<Path>>(path: P) -> Result<Self>
Create a new ManifestPath, errors if not path to Cargo.toml
sourcepub fn directory(&self) -> Option<&Path>
pub fn directory(&self) -> Option<&Path>
The directory path of the manifest path.
Returns None if the path is just the plain file name Cargo.toml
sourcepub fn absolute_directory(&self) -> Result<PathBuf, Error>
pub fn absolute_directory(&self) -> Result<PathBuf, Error>
Returns the absolute directory path of the manifest.
Trait Implementations§
source§impl AsRef<Path> for ManifestPath
impl AsRef<Path> for ManifestPath
source§impl Clone for ManifestPath
impl Clone for ManifestPath
source§fn clone(&self) -> ManifestPath
fn clone(&self) -> ManifestPath
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ManifestPath
impl Debug for ManifestPath
source§impl Default for ManifestPath
impl Default for ManifestPath
source§fn default() -> ManifestPath
fn default() -> ManifestPath
Returns the “default value” for a type. Read more
source§impl From<ManifestPath> for PathBuf
impl From<ManifestPath> for PathBuf
source§fn from(path: ManifestPath) -> Self
fn from(path: ManifestPath) -> Self
Converts to this type from the input type.