pub struct FetchProgress { /* private fields */ }Expand description
FetchProgress is the public handle the ktstr / cargo-ktstr
binaries construct to render kernel-fetch progress (the parallel
resolve_kernel_set and the single-shot kernel build paths).
It must be pub (not pub(crate)) because those call sites live
in the binary crates and thread &FetchProgress into the library
resolvers — the same lib/bin-boundary reason Spinner is pub.
The child-bar types (GroupBar, CloneProgress) stay
pub(crate): only the in-crate fetch path constructs them.
Shared owner of the concurrent fetch progress bars for one resolve
operation.
Wraps an [indicatif::MultiProgress] (constructed against a hidden
draw target off-TTY) and hands out child bars via download_bar /
clone_progress. Created once per resolve and shared across the rayon
resolve_specs_parallel workers by & reference — MultiProgress
is Send + Sync and add is internally serialized on an
Arc<RwLock>, so concurrent download_bar/clone_progress calls
are safe.
Off-TTY (!stderr_color()) the group draws to a hidden target:
every child bar is a no-op, inc/finish emit nothing, and the
gix poll thread is never spawned — piped/CI stderr stays
escape-free, matching the crate::cli::Spinner degradation
contract.
Implementations§
Source§impl FetchProgress
impl FetchProgress
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a fetch-progress group. On a TTY it renders to
stderr; otherwise (non-TTY / NO_COLOR / TERM=dumb) it uses
a hidden draw target so nothing reaches piped output.
The stderr_color() gate mirrors crate::cli::Spinner;
indicatif additionally auto-hides on a non-TTY, so the hidden
behavior is correct even if the two ever disagreed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FetchProgress
impl RefUnwindSafe for FetchProgress
impl Send for FetchProgress
impl Sync for FetchProgress
impl Unpin for FetchProgress
impl UnwindSafe for FetchProgress
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>
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>
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>
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 more