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; }
The top level of a progress task hiearchy, with progress::Task
s identified with progress::Key
s
Required methods
fn messages_capacity(&self) -> usize
[src]
Returns the maximum amount of messages we can keep before overwriting older ones.
fn num_tasks(&self) -> usize
[src]
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.
fn sorted_snapshot(&self, out: &mut Vec<(Key, Task)>)
[src]
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>)
[src]
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
[src]
&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.
Implementors
impl Root for Root
[src]
impl Root for Root
[src]fn messages_capacity(&self) -> usize
[src]
fn num_tasks(&self) -> usize
[src]
fn sorted_snapshot(&self, out: &mut Vec<(Key, Task)>)
[src]
fn copy_messages(&self, out: &mut Vec<Message>)
[src]
fn copy_new_messages(
&self,
out: &mut Vec<Message>,
prev: Option<MessageCopyState>
) -> MessageCopyState
[src]
&self,
out: &mut Vec<Message>,
prev: Option<MessageCopyState>
) -> MessageCopyState