Skip to main content

TaskRef

Type Alias TaskRef 

Source
pub type TaskRef<'a> = MaybeImported<&'a Task, &'a ImportedTask>;
Expand description

A reference to a task in the document’s scope.

Aliased Type§

pub enum TaskRef<'a> {
    Local(&'a Task),
    Imported(&'a ImportedTask),
}

Variants§

§

Local(&'a Task)

The item is locally defined.

§

Imported(&'a ImportedTask)

The item was imported from another document.

Implementations§

Source§

impl<'a> TaskRef<'a>

Source

pub fn name(&self) -> &'a str

Gets the name of the task.

Source

pub fn name_span(&self) -> Span

Gets the span of the name.

Source

pub fn inputs(&self) -> Arc<IndexMap<String, Input>>

The inputs of the task.

Source

pub fn outputs(&self) -> Arc<IndexMap<String, Output>>

The outputs of the task.

Source

pub fn source(&self) -> Option<Arc<Url>>

Gets the source of the task, if it was imported.