pub struct Pool {
pub identity: u64,
pub packages: Vec<usize>,
pub unacceptable_fixed_or_locked: Vec<usize>,
pub warnings: Vec<String>,
pub filter_list_removed: FilterListRemoved,
/* 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>§filter_list_removed: FilterListRemovedfilterListRemovedVersions: what a filter list removed (the rule
generator and the solver consult it).
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.
pub fn is_unacceptable_fixed_or_locked(&self, arena_idx: usize) -> bool
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
Mutably borrows from an owned value. Read more