Skip to main content

Task

Struct Task 

Source
pub struct Task { /* private fields */ }
Expand description

First-class immutable task declaration owned by exactly one Phase.

Implementations§

Source§

impl Task

Source

pub fn key(&self) -> &TaskKey

Returns the exact phase-qualified task key.

Source

pub fn id(&self) -> &TaskId

Returns the phase-local task ID.

Source

pub fn kind(&self) -> &str

Returns the task kind/namespace.

Source

pub fn label(&self) -> &str

Returns the automatically generated display label.

Source

pub const fn display_kind(&self) -> TaskDisplayKind

Returns whether the task renders iterative progress or activity status.

Source

pub fn configuration_ordinal(&self) -> u64

Returns the originating deterministic configuration ordinal.

Source

pub fn configuration(&self) -> &TaskConfig

Borrows the retained cheap task-configuration handle.

Source

pub fn value(&self, key: &str) -> Option<&Value>

Borrows one fixed or swept parameter by exact key.

Source

pub fn require_value(&self, key: &str) -> Result<&Value, ReportingError>

Borrows one required task parameter.

Source

pub fn decode_value<T>(&self, key: &str) -> Result<T, ReportingError>

Decodes one required task parameter without first cloning its JSON tree.

Source

pub fn iter(&self) -> impl Iterator<Item = (&str, &Value)> + '_

Iterates every fixed or swept parameter without cloning values.

Source

pub fn display_keys(&self) -> Option<&[Box<str>]>

Borrows the exact keys used to generate the current label.

Trait Implementations§

Source§

impl Debug for Task

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Task

§

impl !Sync for Task

§

impl !UnwindSafe for Task

§

impl Freeze for Task

§

impl Send for Task

§

impl Unpin for Task

§

impl UnsafeUnpin for Task

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.