enum ConflictStoreTrie {
Leaf(BTreeMap<PackageId, ConflictReason>),
Node(BTreeMap<PackageId, ConflictStoreTrie>),
}
Expand description
This is a trie for storing a large number of sets designed to efficiently see if any of the stored sets are a subset of a search set.
Variants§
Leaf(BTreeMap<PackageId, ConflictReason>)
One of the stored sets.
Node(BTreeMap<PackageId, ConflictStoreTrie>)
A map from an element to a subtrie where all the sets in the subtrie contains that element.
Implementations§
Source§impl ConflictStoreTrie
impl ConflictStoreTrie
Sourcefn find(
&self,
is_active: &impl Fn(PackageId) -> Option<usize>,
must_contain: Option<PackageId>,
max_age: usize,
) -> Option<(&BTreeMap<PackageId, ConflictReason>, usize)>
fn find( &self, is_active: &impl Fn(PackageId) -> Option<usize>, must_contain: Option<PackageId>, max_age: usize, ) -> Option<(&BTreeMap<PackageId, ConflictReason>, usize)>
Finds any known set of conflicts, if any,
where all elements return some from is_active
and contain PackageId
specified.
If more than one are activated, then it will return
one that will allow for the most jump-back.
fn insert( &mut self, iter: impl Iterator<Item = PackageId>, con: BTreeMap<PackageId, ConflictReason>, )
Auto Trait Implementations§
impl Freeze for ConflictStoreTrie
impl RefUnwindSafe for ConflictStoreTrie
impl Send for ConflictStoreTrie
impl Sync for ConflictStoreTrie
impl Unpin for ConflictStoreTrie
impl UnwindSafe for ConflictStoreTrie
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Leaf
: 24 bytesNode
: 24 bytes