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;
}
Available on crate feature
progress
only.Expand description
A trait for describing hierarchical progress.
Required Associated Types§
sourcetype SubProgress: NestedProgress
type SubProgress: NestedProgress
The type of progress returned by [add_child()
][Progress::add_child()].
Required Methods§
sourcefn add_child(&mut self, name: impl Into<String>) -> Self::SubProgress
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.
sourcefn add_child_with_id(
&mut self,
name: impl Into<String>,
id: [u8; 4],
) -> Self::SubProgress
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
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.