pub struct WorkHandler { /* private fields */ }
Implementations§
Source§impl WorkHandler
impl WorkHandler
pub fn new(id: &TaskId, cache_loc: PathBuf) -> WorkHandler
pub fn has_inputs_and_outputs(&self) -> bool
Sourcepub fn remove_execution_history(&self) -> Result<(), Error>
pub fn remove_execution_history(&self) -> Result<(), Error>
Removes execution history, if it exists.
Sourcepub fn store_execution_history(&self) -> Result<(), PayloadError<ProjectError>>
pub fn store_execution_history(&self) -> Result<(), PayloadError<ProjectError>>
Store execution data. Will only perform a store if there’s both an input and an output
pub fn cache_input(&self, input: Input) -> Result<(), Error>
pub fn try_get_prev_input(&self) -> Option<&Input>
pub fn add_input<T, P>(
&mut self,
id: &str,
value: P,
) -> Result<(), PayloadError<ProjectError>>where
T: Serialize + Send + Sync + Clone + 'static,
P: IntoProvider<T>,
<P as IntoProvider<T>>::Provider: 'static,
pub fn add_input_file<Pa, P>(
&mut self,
id: &str,
value: P,
) -> Result<(), PayloadError<ProjectError>>where
Pa: AsRef<Path> + 'static + Send + Sync + Clone,
P: IntoProvider<Pa>,
<P as IntoProvider<Pa>>::Provider: 'static + Clone,
pub fn add_input_files<Pa, P>(
&mut self,
id: &str,
value: P,
) -> Result<(), PayloadError<ProjectError>>where
P: IntoProvider<Pa>,
Pa: FileCollection + Send + Sync + Clone + 'static,
<P as IntoProvider<Pa>>::Provider: 'static + Clone,
pub fn add_input_prop<T, P>(
&mut self,
prop: &P,
) -> Result<(), PayloadError<ProjectError>>where
T: Serialize + Send + Sync + Clone + 'static,
P: IntoProvider<T> + Clone,
<P as IntoProvider<T>>::Provider: 'static,
pub fn get_input(&self) -> Result<&Input, PayloadError<ProjectError>>
Sourcepub fn add_output<F>(&mut self, fc: F)where
F: FileCollection,
pub fn add_output<F>(&mut self, fc: F)where
F: FileCollection,
Add some output file collection. Can add outputs until get_output
is called.
Sourcepub fn add_output_provider<P, F>(&mut self, fc_provider: P)
pub fn add_output_provider<P, F>(&mut self, fc_provider: P)
Add some output file collection. Can add outputs until get_output
is called.
Sourcepub fn add_serialized_data<P, T>(&mut self, id: &str, value: P)where
T: Serialize + DeserializeOwned + 'static + Send + Sync + Clone,
P: IntoProvider<T>,
<P as IntoProvider<T>>::Provider: 'static,
pub fn add_serialized_data<P, T>(&mut self, id: &str, value: P)where
T: Serialize + DeserializeOwned + 'static + Send + Sync + Clone,
P: IntoProvider<T>,
<P as IntoProvider<T>>::Provider: 'static,
Add data that can be serialized, then deserialized later for reuse
Sourcepub fn add_empty_serialized_data(&mut self, id: &str)
pub fn add_empty_serialized_data(&mut self, id: &str)
Add data that can be serialized, then deserialized later for reuse
Sourcepub fn get_output(&self) -> Result<Option<&Output>, PayloadError<ProjectError>>
pub fn get_output(&self) -> Result<Option<&Output>, PayloadError<ProjectError>>
Get the output of this file collection
pub fn prev_work(&self) -> Option<(&Input, &Output)>
Sourcepub fn try_get_prev_output(&self) -> Option<&Output>
pub fn try_get_prev_output(&self) -> Option<&Output>
Try to get the output of the previous run
pub fn did_work(&self) -> bool
pub fn set_did_work(&mut self, did_work: bool)
pub fn set_up_to_date(&mut self, up_to_date_status: bool)
pub fn up_to_date(&self) -> &bool
Trait Implementations§
Source§impl IntoBuildable for &WorkHandler
impl IntoBuildable for &WorkHandler
type Buildable = VecProp<Serializable>
Source§fn into_buildable(self) -> <&WorkHandler as IntoBuildable>::Buildable
fn into_buildable(self) -> <&WorkHandler as IntoBuildable>::Buildable
Returns a dependency which contains the tasks which build this object.
Auto Trait Implementations§
impl !Freeze for WorkHandler
impl !RefUnwindSafe for WorkHandler
impl Send for WorkHandler
impl Sync for WorkHandler
impl Unpin for WorkHandler
impl !UnwindSafe for WorkHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> InstanceOf for T
impl<T> InstanceOf for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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