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