Struct prodash::Tree [−][src]
pub struct Tree { /* 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 Item
s 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::Item
s, 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.
pub fn copy_new_messages(
&self,
out: &mut Vec<Message>,
prev: Option<MessageCopyState>
) -> MessageCopyState
pub fn copy_new_messages(
&self,
out: &mut Vec<Message>,
prev: Option<MessageCopyState>
) -> MessageCopyState
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 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
fn copy_new_messages(
&self,
out: &mut Vec<Message>,
prev: Option<MessageCopyState>
) -> MessageCopyState
fn copy_new_messages(
&self,
out: &mut Vec<Message>,
prev: Option<MessageCopyState>
) -> MessageCopyState
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
impl !RefUnwindSafe for Root
impl !UnwindSafe for Root
Blanket Implementations
Mutably borrows from an owned value. Read more