Struct cargo_pack::CargoPack
[−]
[src]
pub struct CargoPack<'cfg> { /* fields omitted */ }
cargo-pack API
Methods
impl<'cfg> CargoPack<'cfg>
[src]
fn new<'a, P: Into<Option<String>>>(
config: &'cfg Config,
package_name: P
) -> Result<Self>
config: &'cfg Config,
package_name: P
) -> Result<Self>
create a new CargoPack value
let config = Config::default().unwrap(); let pack = CargoPack::new(&config, None);
fn ws(&self) -> &Workspace<'cfg>
returns the current working space of the package of package_name
fn config(&self) -> &PackConfig
returns the PackConfig value
fn package(&self) -> Result<&Package>
returns the Package
value of package_name
fn decode_from_manifest<'a, T: Decodable>(&self) -> Result<T>
decode a value from the manifest toml file.
fn files(&self) -> &[String]
returns files defined in package.metadata.pack.files
in the Cargo.toml.