pub struct InferenceJob {
pub task: InferenceTask,
pub emitter: GeneratedItemEmitter,
}Expand description
Defines a job to be run during inference.
Fields§
§task: InferenceTaskThe task to be performed by the job.
emitter: GeneratedItemEmitterThe emitter for the current job.
Implementations§
Source§impl InferenceJob
impl InferenceJob
Sourcepub fn create<L: InferenceJobListener>(
task: InferenceTask,
listener: L,
) -> (Self, JobHandle<L>)
pub fn create<L: InferenceJobListener>( task: InferenceTask, listener: L, ) -> (Self, JobHandle<L>)
Start a new inference job and process it on another thread.
When a task is performed for the current job, it should be registered using the completed method.
Auto Trait Implementations§
impl Freeze for InferenceJob
impl RefUnwindSafe for InferenceJob
impl Send for InferenceJob
impl Sync for InferenceJob
impl Unpin for InferenceJob
impl UnwindSafe for InferenceJob
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> 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