pub struct ImportPlan {
pub entries: Vec<ImportEntry>,
}Expand description
Everything an import would do, in a stable order.
Why: producing the plan and executing it are separate steps precisely so the
operator can read the first before authorising the second.
What: entries sorted by target path.
Test: paths::import_tests::plan_is_sorted_and_deterministic.
Fields§
§entries: Vec<ImportEntry>The per-file decisions, sorted by ImportEntry::to.
Implementations§
Source§impl ImportPlan
impl ImportPlan
Sourcepub fn to_copy(&self) -> impl Iterator<Item = &ImportEntry>
pub fn to_copy(&self) -> impl Iterator<Item = &ImportEntry>
The entries that would actually be copied.
Why: the count an operator wants before confirming, without re-filtering
at each call site.
What: entries whose action is ImportAction::Copy.
Test: paths::import_tests::plan_is_sorted_and_deterministic.
Trait Implementations§
Source§impl Clone for ImportPlan
impl Clone for ImportPlan
Source§impl Debug for ImportPlan
impl Debug for ImportPlan
Source§impl Default for ImportPlan
impl Default for ImportPlan
impl Eq for ImportPlan
Source§impl PartialEq for ImportPlan
impl PartialEq for ImportPlan
impl StructuralPartialEq for ImportPlan
Auto Trait Implementations§
impl Freeze for ImportPlan
impl RefUnwindSafe for ImportPlan
impl Send for ImportPlan
impl Sync for ImportPlan
impl Unpin for ImportPlan
impl UnsafeUnpin for ImportPlan
impl UnwindSafe for ImportPlan
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 moreCreates a shared type from an unshared type.