pub struct RunContext<'a, InputT> {
pub job_id: JobId,
pub input: &'a InputT,
pub data_set: &'a DataSet,
pub schema_set: &'a SchemaSet,
/* private fields */
}
Fields§
§job_id: JobId
§input: &'a InputT
§data_set: &'a DataSet
§schema_set: &'a SchemaSet
Implementations§
Source§impl<'a, InputT> RunContext<'a, InputT>
impl<'a, InputT> RunContext<'a, InputT>
pub fn warn<T: Into<String>>(&self, message: T)
pub fn error<T: Into<String>>(&self, message: T)
pub fn asset<T: Record>( &'a self, asset_id: AssetId, ) -> PipelineResult<T::Reader<'a>>
pub fn imported_data<T: Record>( &'a self, asset_id: AssetId, ) -> PipelineResult<T::Reader<'a>>
pub fn enqueue_job<JobProcessorT: JobProcessor>( &self, input: <JobProcessorT as JobProcessor>::InputT, ) -> PipelineResult<JobId>
pub fn produce_artifact<KeyT: Hash + Display, ArtifactT: TypeUuid + Serialize>( &self, asset_id: AssetId, artifact_key: Option<KeyT>, asset: ArtifactT, ) -> PipelineResult<AssetArtifactIdPair>
pub fn produce_artifact_with_handles<KeyT: Hash + Display, ArtifactT: TypeUuid + Serialize, F: FnOnce(HandleFactory<'_>) -> PipelineResult<ArtifactT>>( &self, asset_id: AssetId, artifact_key: Option<KeyT>, asset_fn: F, ) -> PipelineResult<ArtifactId>
pub fn produce_default_artifact<AssetT: TypeUuid + Serialize>( &self, asset_id: AssetId, asset: AssetT, ) -> PipelineResult<ArtifactId>
pub fn produce_default_artifact_with_handles<AssetT: TypeUuid + Serialize, F: FnOnce(HandleFactory<'_>) -> PipelineResult<AssetT>>( &self, asset_id: AssetId, asset_fn: F, ) -> PipelineResult<ArtifactId>
Trait Implementations§
Source§impl<'a, InputT: Clone> Clone for RunContext<'a, InputT>
impl<'a, InputT: Clone> Clone for RunContext<'a, InputT>
Source§fn clone(&self) -> RunContext<'a, InputT>
fn clone(&self) -> RunContext<'a, InputT>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<'a, InputT: Copy> Copy for RunContext<'a, InputT>
Auto Trait Implementations§
impl<'a, InputT> Freeze for RunContext<'a, InputT>
impl<'a, InputT> !RefUnwindSafe for RunContext<'a, InputT>
impl<'a, InputT> !Send for RunContext<'a, InputT>
impl<'a, InputT> !Sync for RunContext<'a, InputT>
impl<'a, InputT> Unpin for RunContext<'a, InputT>
impl<'a, InputT> !UnwindSafe for RunContext<'a, InputT>
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