AndroidTask

Enum AndroidTask 

Source
pub enum AndroidTask {
    BuildRuntimeLibrary(BuildRuntimeLibrary),
    GenerateSourceTree(GenerateSourceTree),
    FindAndroidStudio(FindAndroidStudio),
    Install(Install),
    InstallTarget(InstallTarget),
    LinkNativeLibraries(LinkNativeLibraries),
    Run(Run),
}
Expand description

Represents one of the Android-specific tasks.

Variants§

§

BuildRuntimeLibrary(BuildRuntimeLibrary)

This tasks builds the runtime library for the given target and with the given profile.

§

GenerateSourceTree(GenerateSourceTree)

This task generates a new source tree based on the template that ships with polyhorn-cli.

§

FindAndroidStudio(FindAndroidStudio)

This task attempts to locate Android Studio and uses the result to locate the Android SDK and Java home. The Android Studio itself isn’t used, but it’s the easiest way of obtaining a working installation of the SDK, NDK and Java that are all compatible.

§

Install(Install)

This task invokes Gradle to install a debug-build on the user’s device or emulator.

§

InstallTarget(InstallTarget)

This task installs a target with a given name using rustup, if necessary.

§

LinkNativeLibraries(LinkNativeLibraries)

This task copies all products from the BuildRuntimeLibrary task into the jniLibs folder of the Android source tree.

§

Run(Run)

This task launches the newly installed Polyhorn-powered app on a user’s device or emulator.

Trait Implementations§

Source§

impl Task for AndroidTask

Source§

type Context = AndroidContext

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

type Error = AndroidError

The type of error that this task can return.
Source§

fn verb(&self) -> &str

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

fn message(&self) -> &str

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

fn detail(&self) -> &str

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

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

This function should execute the task.

Auto Trait Implementations§

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V