[][src]Trait polyhorn_cli::core::Task

pub trait Task {
    type Context;
    type Error;
    pub fn verb(&self) -> &str;
pub fn message(&self) -> &str;
pub fn detail(&self) -> &str;
pub fn run(
        &self,
        context: Self::Context,
        manager: &mut Manager<'_>
    ) -> Result<Self::Context, Self::Error>; }

Represents an individual task that a CLI command is composed of.

Associated Types

type Context[src]

The type of context that is passed to this task, processed and subsequently returned by this task.

type Error[src]

The type of error that this task can return.

Loading content...

Required methods

pub fn verb(&self) -> &str[src]

The verb that describes this task (e.g. "Launching" or "Building") that is shown to the user while the task is running.

pub fn message(&self) -> &str[src]

The message that is shown to the user alongside the verb. This usually starts with a lowercase letter (e.g. "[Generating] source tree").

pub fn detail(&self) -> &str[src]

Optional additional text that is shown to the user alongside the message. This usually starts with a lowercase letter too (e.g.

pub fn run(
    &self,
    context: Self::Context,
    manager: &mut Manager<'_>
) -> Result<Self::Context, Self::Error>
[src]

This function should execute the task.

Loading content...

Implementors

impl Task for AndroidTask[src]

type Context = AndroidContext

type Error = AndroidError

impl Task for IOSTask[src]

type Context = IOSContext

type Error = IOSError

impl Task for polyhorn_cli::android::tasks::BuildRuntimeLibrary[src]

type Context = AndroidContext

type Error = AndroidError

impl Task for FindAndroidStudio[src]

type Context = AndroidContext

type Error = AndroidError

impl Task for GenerateSourceTree[src]

type Context = AndroidContext

type Error = AndroidError

impl Task for Install[src]

type Context = AndroidContext

type Error = AndroidError

impl Task for InstallTarget[src]

type Context = ()

type Error = Error

impl Task for LinkNativeLibraries[src]

type Context = AndroidContext

type Error = AndroidError

impl Task for Run[src]

type Context = AndroidContext

type Error = AndroidError

impl Task for InstallDependencies[src]

type Context = ()

type Error = Error

impl Task for BootIOSSimulator[src]

type Context = IOSContext

type Error = IOSError

impl Task for polyhorn_cli::ios::tasks::BuildRuntimeLibrary[src]

type Context = IOSContext

type Error = IOSError

impl Task for BuildRuntimeLibraryV2[src]

type Context = IOSContext

type Error = IOSError

impl Task for BuildXcodeproj[src]

type Context = IOSContext

type Error = IOSError

impl Task for CreateUniversalBinary[src]

type Context = IOSContext

type Error = IOSError

impl Task for GenerateXcassets[src]

type Context = IOSContext

type Error = IOSError

impl Task for GenerateXcodeproj[src]

type Context = IOSContext

type Error = IOSError

impl Task for InstallOnIOSSimulator[src]

type Context = IOSContext

type Error = IOSError

impl Task for OpenIOSSimulator[src]

type Context = IOSContext

type Error = IOSError

impl Task for RunOnIOSSimulator[src]

type Context = IOSContext

type Error = IOSError

Loading content...