pub struct CargoPack { /* private fields */ }Expand description
cargo-pack API
Implementations§
Source§impl CargoPack
impl CargoPack
Sourcepub fn new<P: Into<Option<String>>>(package_name: P) -> Result<Self>
pub fn new<P: Into<Option<String>>>(package_name: P) -> Result<Self>
create a new CargoPack value
ⓘ
let config = Config::default().unwrap();
let pack = CargoPack::new(&config, None);Sourcepub fn config(&self) -> &PackConfig
pub fn config(&self) -> &PackConfig
returns the PackConfig value
Sourcepub fn decode_from_manifest<'a, T: DeserializeOwned>(&self) -> Result<T>
pub fn decode_from_manifest<'a, T: DeserializeOwned>(&self) -> Result<T>
decode a value from the manifest toml file.
Auto Trait Implementations§
impl Freeze for CargoPack
impl RefUnwindSafe for CargoPack
impl Send for CargoPack
impl Sync for CargoPack
impl Unpin for CargoPack
impl UnwindSafe for CargoPack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more