pub trait PgrxManifestExt {
// Required methods
fn package_name(&self) -> Result<String>;
fn package_version(&self) -> Result<String>;
fn lib_name(&self) -> Result<String>;
fn target_name(&self) -> Result<String>;
fn lib_filename(&self) -> Result<String>;
}
Expand description
Extension to cargo_toml::Manifest
.
Import by adding use pgrx_pg_config::cargo::PgrxManifestExt;
and extended functions will be available on Manifest
values.
Required Methods§
Sourcefn package_name(&self) -> Result<String>
fn package_name(&self) -> Result<String>
Package name
Sourcefn package_version(&self) -> Result<String>
fn package_version(&self) -> Result<String>
Package version
Sourcefn lib_name(&self) -> Result<String>
fn lib_name(&self) -> Result<String>
Resolved string for target library name, either its lib.name, or package name with hyphens replaced with underscore. https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-name-field
Sourcefn target_name(&self) -> Result<String>
fn target_name(&self) -> Result<String>
Resolved string for target artifact name, used for matching on
cargo_metadata::message::Artifact
.
Sourcefn lib_filename(&self) -> Result<String>
fn lib_filename(&self) -> Result<String>
Resolved string for target library name extension filename