Trait prodash::Root [−][src]
pub trait Root { fn messages_capacity(&self) -> usize; fn num_tasks(&self) -> usize; fn sorted_snapshot(&self, out: &mut Vec<(Key, Task)>); fn copy_messages(&self, out: &mut Vec<Message>); fn copy_new_messages(
&self,
out: &mut Vec<Message>,
prev: Option<MessageCopyState>
) -> MessageCopyState; }
Expand description
The top level of a progress task hiearchy, with progress::Task
s identified with progress::Key
s
Required methods
fn messages_capacity(&self) -> usize
fn messages_capacity(&self) -> usize
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.
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.
fn copy_messages(&self, out: &mut Vec<Message>)
fn copy_messages(&self, out: &mut Vec<Message>)
Copy all messages from the internal ring buffer into the given out
vector. Messages are ordered from oldest to newest.
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.