pub enum DirAction<Sum, Ctx, State> {
Skip(Sum),
Descend {
dir: Arc<Dir>,
child_ctx: Ctx,
state: State,
},
}Expand description
What a WalkVisitor::dir_pre decided to do with a directory entry.
Generic over the tool’s summary Sum (carried by Self::Skip), the
per-directory inherited Ctx (carried by Self::Descend to this
directory’s children), and the per-directory State (carried by
Self::Descend to WalkVisitor::dir_post).
Variants§
Skip(Sum)
Do not descend; the whole subtree contributes Sum and nothing else
(e.g. --ignore-existing hit a non-directory destination, or a
filtered-out directory).
Descend
Descend into dir; child_ctx is the inherited context handed to this
directory’s children (copy’s destination dir + freshness; chmod/rm: ()),
and state is carried, in the same task, to WalkVisitor::dir_post.
Fields
dir: Arc<Dir>The hardened directory whose contents to walk. For copy this is the
source directory being read; the destination travels in child_ctx.
child_ctx: CtxThe inherited context the driver clones into each child task and hands
to the child’s WalkVisitor::visit_leaf / WalkVisitor::dir_pre.
This is how copy threads the destination parent directory down one
level without the driver knowing a second tree exists.
state: StateTool state threaded from dir_pre to dir_post in the same task
(copy’s we_created + dst handle for metadata; rm’s RelaxedDirGuard +
snapshot; chmod’s ()).
Auto Trait Implementations§
impl<Sum, Ctx, State> Freeze for DirAction<Sum, Ctx, State>
impl<Sum, Ctx, State> RefUnwindSafe for DirAction<Sum, Ctx, State>
impl<Sum, Ctx, State> Send for DirAction<Sum, Ctx, State>
impl<Sum, Ctx, State> Sync for DirAction<Sum, Ctx, State>
impl<Sum, Ctx, State> Unpin for DirAction<Sum, Ctx, State>
impl<Sum, Ctx, State> UnsafeUnpin for DirAction<Sum, Ctx, State>
impl<Sum, Ctx, State> UnwindSafe for DirAction<Sum, Ctx, State>
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request