pub struct RootPackage {
pub name: String,
pub pretty_version: String,
pub version: String,
pub reference: Option<String>,
pub package_type: String,
pub dev: bool,
pub aliases: Vec<String>,
pub alias_normalized: Option<String>,
}Expand description
The project’s root package (composer.json), for installed.php.
Fields§
§name: String§pretty_version: String§version: String§reference: Option<String>§package_type: String§dev: bool§aliases: Vec<String>Branch alias (extra.branch-alias): pretty version of the alias.
alias_normalized: Option<String>The same alias, normalised (RootAliasPackage::getVersion()).
Implementations§
Source§impl RootPackage
impl RootPackage
Sourcepub fn detect(manifest: &Value, project_dir: &Path, dev: bool) -> RootPackage
pub fn detect(manifest: &Value, project_dir: &Path, dev: bool) -> RootPackage
Like RootPackageLoader: version from composer.json, else
COMPOSER_ROOT_VERSION, else guessed from git, else
1.0.0+no-version-set (see root_version.rs).
Sourcepub fn from_manifest(manifest: &Value, dev: bool) -> RootPackage
pub fn from_manifest(manifest: &Value, dev: bool) -> RootPackage
Without VCS or environment detection (tests, cases with no project on disk).
Trait Implementations§
Source§impl Clone for RootPackage
impl Clone for RootPackage
Source§fn clone(&self) -> RootPackage
fn clone(&self) -> RootPackage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RootPackage
impl RefUnwindSafe for RootPackage
impl Send for RootPackage
impl Sync for RootPackage
impl Unpin for RootPackage
impl UnsafeUnpin for RootPackage
impl UnwindSafe for RootPackage
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