pub struct Pool {
pub identity: u64,
pub packages: Vec<usize>,
pub unacceptable_fixed_or_locked: Vec<usize>,
pub warnings: Vec<String>,
pub flex_notice: Option<String>,
pub filter_list_removed: FilterListRemoved,
pub security_removed: BTreeMap<String, Vec<(String, Vec<String>)>>,
pub abandoned_removed: BTreeMap<String, BTreeMap<String, String>>,
pub removed_versions: BTreeMap<String, BTreeMap<String, String>>,
pub removed_versions_by_package: BTreeMap<usize, BTreeMap<String, String>>,
/* private fields */
}Fields§
§identity: u64Pool identity (spl_object_id($pool) in Composer): the policy caches
are keyed by pool.
packages: Vec<usize>id - 1 -> arena index.
unacceptable_fixed_or_locked: Vec<usize>§warnings: Vec<String>§flex_notice: Option<String>Flex’s Restricting packages listed in "symfony/symfony" to …
notice, printed once by the caller before Updating dependencies.
filter_list_removed: FilterListRemovedfilterListRemovedVersions: what a filter list removed (the rule
generator and the solver consult it).
security_removed: BTreeMap<String, Vec<(String, Vec<String>)>>securityRemovedVersions: name (own name and replaced names) ->
[(normalized version, advisory ids)] in pool order (messages only).
abandoned_removed: BTreeMap<String, BTreeMap<String, String>>abandonedRemovedVersions: name -> normalized version -> pretty.
removed_versions: BTreeMap<String, BTreeMap<String, String>>removedVersions: name -> normalized version -> pretty version of
the packages the PoolOptimizer dropped (messages only).
removed_versions_by_package: BTreeMap<usize, BTreeMap<String, String>>removedVersionsByPackage: arena index of a kept package -> the
versions it stands for (recordRemovedVersionsForPackage).
Implementations§
Source§impl Pool
impl Pool
pub fn new( packages: Vec<usize>, unacceptable: Vec<usize>, arena: &[Package], ) -> Pool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn package_by_id(&self, id: usize) -> usize
pub fn package_by_id(&self, id: usize) -> usize
packageById -> arena index.
pub fn id_of(&self, arena_idx: usize) -> Option<usize>
pub fn literal_to_package(&self, literal: i64) -> usize
Sourcepub fn what_provides(
&self,
arena: &[Package],
name: &str,
constraint: Option<&Constraint>,
) -> Vec<usize>
pub fn what_provides( &self, arena: &[Package], name: &str, constraint: Option<&Constraint>, ) -> Vec<usize>
whatProvides -> pool ids.
Sourcepub fn matches(
candidate: &Package,
name: &str,
constraint: Option<&Constraint>,
) -> bool
pub fn matches( candidate: &Package, name: &str, constraint: Option<&Constraint>, ) -> bool
Pool::match.
Sourcepub fn is_filter_list_removed(&self, name: &str, version: &str) -> bool
pub fn is_filter_list_removed(&self, name: &str, version: &str) -> bool
isFilterListRemovedPackageVersion($name, Constraint('==', $version)).
Sourcepub fn with_packages(&self, kept: Vec<usize>, arena: &[Package]) -> Pool
pub fn with_packages(&self, kept: Vec<usize>, arena: &[Package]) -> Pool
The same pool reduced to kept (renumbered ids), removed versions
and warnings preserved.
Sourcepub fn is_security_removed(&self, name: &str, constraint: &Constraint) -> bool
pub fn is_security_removed(&self, name: &str, constraint: &Constraint) -> bool
isSecurityRemovedPackageVersion.
Sourcepub fn security_advisory_ids(
&self,
name: &str,
constraint: &Constraint,
) -> Vec<String>
pub fn security_advisory_ids( &self, name: &str, constraint: &Constraint, ) -> Vec<String>
getSecurityAdvisoryIdentifiersForPackageVersion: the ids of the
first removed version matching the constraint.
Sourcepub fn is_abandoned_removed(&self, name: &str, constraint: &Constraint) -> bool
pub fn is_abandoned_removed(&self, name: &str, constraint: &Constraint) -> bool
isAbandonedRemovedPackageVersion.
Sourcepub fn is_filter_list_removed_version(
&self,
name: &str,
constraint: &Constraint,
) -> bool
pub fn is_filter_list_removed_version( &self, name: &str, constraint: &Constraint, ) -> bool
isFilterListRemovedPackageVersion.
Sourcepub fn filter_list_entries_text(
&self,
name: &str,
constraint: &Constraint,
) -> Vec<(String, String)>
pub fn filter_list_entries_text( &self, name: &str, constraint: &Constraint, ) -> Vec<(String, String)>
getFilterListEntryForPackageVersion: list name -> text
(“flagged as malware reported by … (see …) reason: …”).
pub fn is_unacceptable_fixed_or_locked(&self, arena_idx: usize) -> bool
Sourcepub fn removed_versions(
&self,
name: &str,
constraint: &Constraint,
) -> Vec<(String, String)>
pub fn removed_versions( &self, name: &str, constraint: &Constraint, ) -> Vec<(String, String)>
getRemovedVersions: the removed versions of name matching the
constraint, in recording order.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pool
impl RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnsafeUnpin for Pool
impl UnwindSafe for Pool
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
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> ⓘ
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> ⓘ
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