Skip to main content

TaskInput

Struct TaskInput 

Source
pub struct TaskInput<'inputs, Input: Send> { /* private fields */ }
Expand description

Linear type providing a Task access to its dependencies.

The framework ensures that all dependencies will be present when this task runs, and can be retrieved with TaskInput::next. The nth call to next consumes this TaskInput instances and returns a (&T, TaskInput) tuple with the nth dependency specified in the call to crate::TaskBuilder::depends_on and a TaskInput with the remaining dependencies.

No dependencies can be retrieved from an empty TaskInput (Input = ()).

Implementations§

Source§

impl<'inputs, A: 'static + Send> TaskInput<'inputs, (A,)>

Source

pub fn next(self) -> (&'inputs A, TaskInput<'inputs, ()>)

Get a reference to the next dependency from this TaskInput, and a TaskInput instance with the remaining dependencies.

Source§

impl<'inputs, A: 'static + Send, B: 'static + Send> TaskInput<'inputs, (A, B)>

Source

pub fn next(self) -> (&'inputs A, TaskInput<'inputs, (B,)>)

Get a reference to the next dependency from this TaskInput, and a TaskInput instance with the remaining dependencies.

Source§

impl<'inputs, A: 'static + Send, B: 'static + Send, C: 'static + Send> TaskInput<'inputs, (A, B, C)>

Source

pub fn next(self) -> (&'inputs A, TaskInput<'inputs, (B, C)>)

Get a reference to the next dependency from this TaskInput, and a TaskInput instance with the remaining dependencies.

Source§

impl<'inputs, A: 'static + Send, B: 'static + Send, C: 'static + Send, D: 'static + Send> TaskInput<'inputs, (A, B, C, D)>

Source

pub fn next(self) -> (&'inputs A, TaskInput<'inputs, (B, C, D)>)

Get a reference to the next dependency from this TaskInput, and a TaskInput instance with the remaining dependencies.

Source§

impl<'inputs, A: 'static + Send, B: 'static + Send, C: 'static + Send, D: 'static + Send, E: 'static + Send> TaskInput<'inputs, (A, B, C, D, E)>

Source

pub fn next(self) -> (&'inputs A, TaskInput<'inputs, (B, C, D, E)>)

Get a reference to the next dependency from this TaskInput, and a TaskInput instance with the remaining dependencies.

Source§

impl<'inputs, A: 'static + Send, B: 'static + Send, C: 'static + Send, D: 'static + Send, E: 'static + Send, F: 'static + Send> TaskInput<'inputs, (A, B, C, D, E, F)>

Source

pub fn next(self) -> (&'inputs A, TaskInput<'inputs, (B, C, D, E, F)>)

Get a reference to the next dependency from this TaskInput, and a TaskInput instance with the remaining dependencies.

Source§

impl<'inputs, A: 'static + Send, B: 'static + Send, C: 'static + Send, D: 'static + Send, E: 'static + Send, F: 'static + Send, G: 'static + Send> TaskInput<'inputs, (A, B, C, D, E, F, G)>

Source

pub fn next(self) -> (&'inputs A, TaskInput<'inputs, (B, C, D, E, F, G)>)

Get a reference to the next dependency from this TaskInput, and a TaskInput instance with the remaining dependencies.

Source§

impl<'inputs, A: 'static + Send, B: 'static + Send, C: 'static + Send, D: 'static + Send, E: 'static + Send, F: 'static + Send, G: 'static + Send, H: 'static + Send> TaskInput<'inputs, (A, B, C, D, E, F, G, H)>

Source

pub fn next(self) -> (&'inputs A, TaskInput<'inputs, (B, C, D, E, F, G, H)>)

Get a reference to the next dependency from this TaskInput, and a TaskInput instance with the remaining dependencies.

Auto Trait Implementations§

§

impl<'inputs, Input> Freeze for TaskInput<'inputs, Input>

§

impl<'inputs, Input> !RefUnwindSafe for TaskInput<'inputs, Input>

§

impl<'inputs, Input> Send for TaskInput<'inputs, Input>

§

impl<'inputs, Input> Sync for TaskInput<'inputs, Input>
where Input: Sync,

§

impl<'inputs, Input> Unpin for TaskInput<'inputs, Input>
where Input: Unpin,

§

impl<'inputs, Input> UnsafeUnpin for TaskInput<'inputs, Input>

§

impl<'inputs, Input> !UnwindSafe for TaskInput<'inputs, Input>

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, 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, 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.