struct PublishPlan {
dependents: Graph<PackageId, ()>,
dependencies_count: HashMap<PackageId, usize>,
}
Expand description
State for tracking dependencies during upload.
Fields§
§dependents: Graph<PackageId, ()>
Graph of publishable packages where the edges are (dependency -> dependent)
dependencies_count: HashMap<PackageId, usize>
The weight of a package is the number of unpublished dependencies it has.
Implementations§
Source§impl PublishPlan
impl PublishPlan
Sourcefn new(graph: &Graph<PackageId, ()>) -> Self
fn new(graph: &Graph<PackageId, ()>) -> Self
Given a package dependency graph, creates a PublishPlan
for tracking state.
fn iter(&self) -> impl Iterator<Item = PackageId> + '_
fn is_empty(&self) -> bool
Sourcefn take_ready(&mut self) -> BTreeSet<PackageId>
fn take_ready(&mut self) -> BTreeSet<PackageId>
Returns the set of packages that are ready for publishing (i.e. have no outstanding dependencies).
These will not be returned in future calls.
Sourcefn mark_confirmed(&mut self, published: impl IntoIterator<Item = PackageId>)
fn mark_confirmed(&mut self, published: impl IntoIterator<Item = PackageId>)
Packages confirmed to be available in the registry, potentially allowing additional packages to be “ready”.
Auto Trait Implementations§
impl Freeze for PublishPlan
impl RefUnwindSafe for PublishPlan
impl !Send for PublishPlan
impl !Sync for PublishPlan
impl Unpin for PublishPlan
impl UnwindSafe for PublishPlan
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
§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: 64 bytes