[][src]Struct cargo_pack::CargoPack

pub struct CargoPack { /* fields omitted */ }

cargo-pack API

Methods

impl CargoPack[src]

pub fn new<P: Into<Option<String>>>(package_name: P) -> Result<Self>[src]

create a new CargoPack value

This example is not tested
let config = Config::default().unwrap();
let pack = CargoPack::new(&config, None);

pub fn metadata(&self) -> &Metadata[src]

returns the Metadata value

pub fn config(&self) -> &PackConfig[src]

returns the PackConfig value

pub fn package(&self) -> Result<&Package>[src]

returns the Package value of package_name

pub fn decode_from_manifest<'a, T: DeserializeOwned>(&self) -> Result<T>[src]

decode a value from the manifest toml file.

pub fn files(&self) -> &[String][src]

returns files defined in package.metadata.pack.files in the Cargo.toml.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.