Trait prodash::NestedProgress

source ·
pub trait NestedProgress: Progress {
    type SubProgress: NestedProgress;

    // Required methods
    fn add_child(&mut self, name: impl Into<String>) -> Self::SubProgress;
    fn add_child_with_id(
        &mut self,
        name: impl Into<String>,
        id: Id,
    ) -> Self::SubProgress;
}
Expand description

A trait for describing hierarchical progress.

Required Associated Types§

source

type SubProgress: NestedProgress

The type of progress returned by [add_child()][Progress::add_child()].

Required Methods§

source

fn add_child(&mut self, name: impl Into<String>) -> Self::SubProgress

Adds a new child, whose parent is this instance, with the given name.

This will make the child progress to appear contained in the parent progress. Note that such progress does not have a stable identifier, which can be added with [add_child_with_id()][Progress::add_child_with_id()] if desired.

source

fn add_child_with_id( &mut self, name: impl Into<String>, id: Id, ) -> Self::SubProgress

Adds a new child, whose parent is this instance, with the given name and id.

This will make the child progress to appear contained in the parent progress, and it can be identified using id.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T> NestedProgress for &'a mut T
where T: NestedProgress + ?Sized,

§

type SubProgress = <T as NestedProgress>::SubProgress

source§

fn add_child(&mut self, name: impl Into<String>) -> Self::SubProgress

source§

fn add_child_with_id( &mut self, name: impl Into<String>, id: Id, ) -> Self::SubProgress

Implementors§