Skip to main content

TaskInfo

Trait TaskInfo 

Source
pub trait TaskInfo {
    // Required method
    fn name(&self) -> &str;

    // Provided methods
    fn connection_plugin_name(&self) -> Option<&str> { ... }
    fn get_connection_key(&self, hostname: &str) -> Option<ConnectionKey> { ... }
    fn options(&self) -> Option<&Value> { ... }
    fn processor_names(&self) -> Vec<&str> { ... }
}
Expand description

Task metadata required for execution.

Task authoring macros such as #[genja_task(...)] implement this trait automatically. You only need to implement it manually when you are building a Task implementation without the macro.

Required Methods§

Source

fn name(&self) -> &str

Return the task’s name.

Provided Methods§

Source

fn connection_plugin_name(&self) -> Option<&str>

Return the task’s connection plugin name, if the task needs a connection.

Source

fn get_connection_key(&self, hostname: &str) -> Option<ConnectionKey>

Build the task’s connection key for a host, if the task needs a connection.

Source

fn options(&self) -> Option<&Value>

Return the task’s options payload, if set.

Source

fn processor_names(&self) -> Vec<&str>

Return processor plugin names selected for this task.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§