pub struct Config { /* private fields */ }Expand description
The configuration, as parsed from Cargo.toml.
Implementations§
Source§impl Config
impl Config
Sourcepub fn from_manifest(manifest: &Table) -> Result<Self>
pub fn from_manifest(manifest: &Table) -> Result<Self>
Constructs the config from a Cargo.toml manifest.
Sourcepub fn package_name(&self) -> &str
pub fn package_name(&self) -> &str
Returns the package name.
This will return the pkg-name metadata entry. If that key is missing,
the crate’s name is returned.
Sourcepub fn package_version(&self) -> &str
pub fn package_version(&self) -> &str
Returns the package version string.
Sourcepub fn cargo_binaries(&self) -> impl Iterator<Item = &str>
pub fn cargo_binaries(&self) -> impl Iterator<Item = &str>
Returns the cargo binaries.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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