pub struct TaskView<'a, R: Renderer> { /* private fields */ }Expand description
Implementations§
Source§impl<'a, R: Renderer> TaskView<'a, R>
impl<'a, R: Renderer> TaskView<'a, R>
Sourcepub fn new(tasks: &'a TaskStore<R>, id: TaskId) -> Self
pub fn new(tasks: &'a TaskStore<R>, id: TaskId) -> Self
Creates a view over the task with the given id.
Sourcepub fn depth(&self) -> usize
pub fn depth(&self) -> usize
Returns the nesting depth of this task (root children are depth 1).
Sourcepub fn cancelled(&self) -> bool
pub fn cancelled(&self) -> bool
Returns true if the task was marked cancelled by crate::Action::CancelAll.
Sourcepub fn parent<'b>(&'b self) -> Option<TaskView<'b, R>>
pub fn parent<'b>(&'b self) -> Option<TaskView<'b, R>>
Returns the parent task, or None for root-level tasks.
Sourcepub fn events<'b>(
&'b self,
) -> impl DoubleEndedIterator<Item = EventView<'b, R>> + ExactSizeIterator
pub fn events<'b>( &'b self, ) -> impl DoubleEndedIterator<Item = EventView<'b, R>> + ExactSizeIterator
Returns an iterator over the task’s buffered events.
Sourcepub fn subtasks<'b>(
&'b self,
) -> impl DoubleEndedIterator<Item = TaskView<'b, R>> + ExactSizeIterator
pub fn subtasks<'b>( &'b self, ) -> impl DoubleEndedIterator<Item = TaskView<'b, R>> + ExactSizeIterator
Returns an iterator over the task’s direct children.
Trait Implementations§
impl<'a, R: Copy + Renderer> Copy for TaskView<'a, R>
Auto Trait Implementations§
impl<'a, R> Freeze for TaskView<'a, R>
impl<'a, R> RefUnwindSafe for TaskView<'a, R>
impl<'a, R> Send for TaskView<'a, R>
impl<'a, R> Sync for TaskView<'a, R>
impl<'a, R> Unpin for TaskView<'a, R>
impl<'a, R> UnsafeUnpin for TaskView<'a, R>
impl<'a, R> UnwindSafe for TaskView<'a, R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more