Trait gix::NestedProgress

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: [u8; 4]
    ) -> Self::SubProgress;
}
Expand description

A trait for describing hierarchical progress.

Required Associated Types§

type SubProgress: NestedProgress

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

Required Methods§

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.

fn add_child_with_id( &mut self, name: impl Into<String>, id: [u8; 4] ) -> 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§

§

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

§

type SubProgress = <T as NestedProgress>::SubProgress

§

fn add_child( &mut self, name: impl Into<String> ) -> <&'a mut T as NestedProgress>::SubProgress

§

fn add_child_with_id( &mut self, name: impl Into<String>, id: [u8; 4] ) -> <&'a mut T as NestedProgress>::SubProgress

Implementors§