Struct TaskHandle

Source
pub struct TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,
{ /* private fields */ }

Implementations§

Source§

impl<T> TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source

pub fn id(&self) -> &TaskId

Gets the id of the created task.

Source

pub fn configure_with<F>( &mut self, config: F, ) -> Result<(), PayloadError<ProjectError>>
where F: FnOnce(&mut Executable<T>, &Project) -> Result<(), PayloadError<ProjectError>> + Send + 'static,

Source

pub fn provides<F, R>(&self, func: F) -> TaskProvider<T, R, F>
where F: Fn(&Executable<T>) -> R + Send + Sync, R: Clone + Send + Sync,

Trait Implementations§

Source§

impl<T> Buildable for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

fn get_dependencies( &self, project: &Project, ) -> Result<HashSet<TaskId>, PayloadError<ProjectError>>

Gets the dependencies required to build this task
Source§

impl<T> BuildableTask for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

fn ordering(&self) -> Vec<TaskOrdering>

Gets the total ordering associated with the task. This includes all types of ordering, including those that aren’t strict dependencies. Read more
Source§

fn built_by(&self) -> BuiltByContainer

Gets the tasks that this task depends on
Source§

impl<T> Clone for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

fn clone(&self) -> TaskHandle<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<AT> Dependency for TaskHandle<AT>
where AT: ArtifactTask + Send + 'static,

Source§

fn id(&self) -> String

A way of identifying dependencies
Source§

fn dep_type(&self) -> DependencyType

The type of the dependency
Source§

fn try_resolve( &self, _: &dyn Registry, _: &Path, ) -> Result<ResolvedDependency, AcquisitionError>

Try to resolve a dependency in a registry. The cache_path is somewhere to write files into if necessary.
Source§

impl<T> ExecutableTask for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

fn options_declarations(&self) -> Option<OptionDeclarations>

Get the options declaration for this task
Source§

fn try_set_from_decoder( &mut self, decoder: &OptionsDecoder<'_>, ) -> Result<(), PayloadError<ProjectError>>

Try to set values from a decoder
Source§

fn execute( &mut self, project: &Project, ) -> Result<(), PayloadError<BuildException>>

Executes the task, with a given project
Source§

fn did_work(&self) -> bool

Checks if this task did work
Source§

fn task_up_to_date(&self) -> bool

Check if this task marked itself as up to date
Source§

fn group(&self) -> String

Gets the group of the task
Source§

fn description(&self) -> String

Gets the description of the task
Source§

impl<T> From<TaskHandle<T>> for FileSet
where T: ArtifactTask,

Source§

fn from(t: TaskHandle<T>) -> FileSet

Converts to this type from the input type.
Source§

impl<T> HasTaskId for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

fn task_id(&self) -> TaskId

Gets the task id
Source§

impl<A> IntoArtifact for &TaskHandle<A>
where A: ArtifactTask,

Source§

impl<A> IntoArtifact for TaskHandle<A>
where A: ArtifactTask,

Source§

impl<T> Provider<PathBuf> for TaskHandle<T>

Source§

fn try_get(&self) -> Option<PathBuf>

Try to get a value from the provider. Read more
Source§

fn missing_message(&self) -> String

The missing message for this provider
Source§

fn get(&self) -> T

Get a value from the provider. Read more
Source§

fn fallible_get(&self) -> Result<T, ProviderError>

Tries to get a value from this provider, returning an error if not available. Read more
Source§

impl<T> ResolveExecutable for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

impl<T> ResolveInnerTask for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

impl<T> UpToDate for TaskHandle<T>
where T: Task + Send + Sync + Debug + 'static,

Source§

fn up_to_date(&self) -> bool

Whether this value is up to date. Read more

Auto Trait Implementations§

§

impl<T> Freeze for TaskHandle<T>

§

impl<T> RefUnwindSafe for TaskHandle<T>

§

impl<T> Send for TaskHandle<T>

§

impl<T> Sync for TaskHandle<T>

§

impl<T> Unpin for TaskHandle<T>

§

impl<T> UnwindSafe for TaskHandle<T>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<B> GetBuildable for B
where B: IntoBuildable + Clone, <B as IntoBuildable>::Buildable: 'static,

Source§

fn as_buildable(&self) -> BuildableObject

Returns a dependency which contains the tasks which build this object.
Source§

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

Source§

fn instance_of<T>(&self) -> bool
where T: Any + ?Sized,

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<B> IntoBuildable for B
where B: Buildable,

Source§

type Buildable = B

Source§

fn into_buildable(self) -> B

Returns a dependency which contains the tasks which build this object.
Source§

impl<D> IntoDependency for D
where D: Dependency,

Source§

type IntoDep = D

Source§

fn into_dependency(self) -> <D as IntoDependency>::IntoDep

Turn this type into a dependency
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoNamed for T

Source§

fn named<S>(self, name: S) -> Named<Self>
where S: AsRef<str>,

Add a name to this object
Source§

impl<P, T> IntoProvider<T> for P
where T: Clone + Send + Sync, P: Provider<T> + Send + Sync,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> ProviderExt<T> for P
where T: Clone + Send + Sync, P: Provider<T> + Send + Sync + 'static,

Source§

fn map<R, F>(self, transform: F) -> Map<T, R, F, Self>
where R: Send + Sync + Clone, F: Fn(T) -> R + Send + Sync, Self: 'static,

Creates a provider that can map the output of one provider into some other value. Read more
Source§

fn flat_map<R, P, F>(self, transform: F) -> FlatMap<T, R, Self, P, F>
where R: Send + Sync + Clone, P: Provider<R>, F: Fn(T) -> P + Send + Sync,

Creates a provider that can map the output of one provider with type T into some other value that’s also a provider of type R. The created provider is a provider of type R Read more
Source§

fn flatten<B>(self) -> FlatMap<T, B, Self, T, fn(T) -> T>
where Self: Clone + 'static, T: Provider<B>, B: Clone + Send + Sync,

Flattens a provider that provides another provider
Source§

fn zip<P, B, R, F>(self, other: P, func: F) -> Zip<T, B, R, F>
where Self: 'static, P: IntoProvider<B>, <P as IntoProvider<B>>::Provider: 'static, B: Send + Sync + Clone, R: Send + Sync + Clone, F: Fn(T, B) -> R + Send + Sync,

Creates a provider that can map the output of two provider with type T1 and T2 into some other value and transforms the two values into one output value of type B. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<E> Extension for E
where E: 'static + Send + Sync,

Source§

impl<F> FullTask for F

Source§

impl<T> MaybeSendSync for T