Struct prodash::tree::Root[][src]

pub struct Root { /* fields omitted */ }
Expand description

The top-level of the progress tree.

Implementations

Create a new tree with default configuration.

As opposed to Item instances, this type can be closed and sent safely across threads.

Returns the maximum amount of messages we can keep before overwriting older ones.

Returns the current amount of Items stored in the tree. Note that this is at most a guess as tasks can be added and removed in parallel.

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

This builds a hierarchy of tree::Items, each having their own progress. Use this method to track progress of your first tasks.

Copy the entire progress tree into the given out vector, so that it can be traversed from beginning to end in order of hierarchy.

Copy all messages from the internal ring buffer into the given out vector. Messages are ordered from oldest to newest.

Copy only new messages from the internal ring buffer into the given out vector. Messages are ordered from oldest to newest.

Duplicate all content and return it.

This is an expensive operation, whereas clone() is not as it is shallow.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Returns the maximum amount of messages we can keep before overwriting older ones.

Returns the current amount of tasks underneath the root, transitively. Note that this is at most a guess as tasks can be added and removed in parallel. Read more

Copy the entire progress tree into the given out vector, so that it can be traversed from beginning to end in order of hierarchy. The out vec will be cleared automatically. Read more

Copy all messages from the internal ring buffer into the given out vector. Messages are ordered from oldest to newest. Read more

Copy only new messages from the internal ring buffer into the given out vector. Messages are ordered from oldest to newest. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.