pub struct Lock {
pub content_hash: Option<String>,
pub packages: Vec<LockPackage>,
pub packages_dev: Vec<LockPackage>,
pub platform: Vec<(String, String)>,
pub platform_dev: Vec<(String, String)>,
pub plugin_api_version: Option<String>,
pub aliases: Vec<Value>,
}Fields§
§content_hash: Option<String>§packages: Vec<LockPackage>§packages_dev: Vec<LockPackage>§platform: Vec<(String, String)>Project platform constraints (php, ext-, lib-) -> constraint.
platform_dev: Vec<(String, String)>§plugin_api_version: Option<String>§aliases: Vec<Value>Implementations§
Source§impl Lock
impl Lock
pub fn parse(text: &str) -> Result<Self>
Sourcepub fn from_value(v: &Value) -> Self
pub fn from_value(v: &Value) -> Self
From an already parsed lock (a caller that also needs the Value
parses once).
pub fn read(path: &Path) -> Result<Self>
Sourcepub fn flex_packs(
&self,
root_manifest: &Value,
with_dev: bool,
plugins_enabled: bool,
) -> bool
pub fn flex_packs( &self, root_manifest: &Value, with_dev: bool, plugins_enabled: bool, ) -> bool
Packages to install according to –no-dev.
Whether symfony-pack packages are virtual for this install: Flex
is in the lock, plugins are enabled and Flex is allowed (Composer
loads it and it registers the pack installer).
pub fn wanted_packages( &self, with_dev: bool, ) -> impl Iterator<Item = &LockPackage>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lock
impl RefUnwindSafe for Lock
impl Send for Lock
impl Sync for Lock
impl Unpin for Lock
impl UnsafeUnpin for Lock
impl UnwindSafe for Lock
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