pub struct RootPackage {
pub package: Package,
pub branch_alias: Option<(String, String)>,
pub minimum_stability: String,
pub prefer_stable: bool,
pub stability_flags: BTreeMap<String, i32>,
pub aliases: Vec<RootAlias>,
pub references: BTreeMap<String, String>,
pub platform_overrides: Map<String, Value>,
pub manifest: Value,
}Fields§
§package: Package§branch_alias: Option<(String, String)>RootAliasPackage: (normalized alias, pretty alias) if extra.branch-alias applies.
minimum_stability: String§prefer_stable: bool§stability_flags: BTreeMap<String, i32>name -> stability rank (BasePackage::STABILITIES).
aliases: Vec<RootAlias>§references: BTreeMap<String, String>name -> git reference.
platform_overrides: Map<String, Value>config.platform.
manifest: ValueImplementations§
Source§impl RootPackage
impl RootPackage
Sourcepub fn load(
manifest: &Value,
project_dir: &Path,
) -> Result<RootPackage, RootError>
pub fn load( manifest: &Value, project_dir: &Path, ) -> Result<RootPackage, RootError>
Loads composer.json (already parsed) with the root version guessed by vivacity-core (same rules as RootPackageLoader + VersionGuesser).
Sourcepub fn apply_patch(&mut self, patch: &RootPatch) -> Result<(), RootError>
pub fn apply_patch(&mut self, patch: &RootPatch) -> Result<(), RootError>
require + require-dev links (array_merge: dev-requires
overwrite a duplicate target, at its position).
The in-memory root patch of a dry run (RequireCommand,
RemoveCommand): the new links are array_merged onto the key’s
links (a duplicate key keeps its position), removed from the other
key by their name, and the references / stability flags are
extended; aliases are not re-extracted (the reference does not).
pub fn all_requires(&self) -> Links
Trait Implementations§
Source§impl Clone for RootPackage
impl Clone for RootPackage
Auto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more