pub struct StrappedInferenceJobBuilder<'a, B: Backend, M, I: RoutineInput, O, S, Flag> { /* private fields */ }Expand description
Builder returned by Inference::infer allowing configuration (devices, state) before
executing the job via StrappedInferenceJobBuilder::run or spawning via StrappedInferenceJobBuilder::spawn.
Implementations§
Source§impl<'a, B, M, I, O, S, Flag> StrappedInferenceJobBuilder<'a, B, M, I, O, S, Flag>
impl<'a, B, M, I, O, S, Flag> StrappedInferenceJobBuilder<'a, B, M, I, O, S, Flag>
Sourcepub fn with_devices(self, devices: impl IntoIterator<Item = B::Device>) -> Self
pub fn with_devices(self, devices: impl IntoIterator<Item = B::Device>) -> Self
Specify the devices to be exposed to the handler (order preserved; first often primary).
Source§impl<'a, B, M, I, O, S> StrappedInferenceJobBuilder<'a, B, M, I, O, S, StateMissing>
impl<'a, B, M, I, O, S> StrappedInferenceJobBuilder<'a, B, M, I, O, S, StateMissing>
Sourcepub fn with_state(
self,
state: S,
) -> StrappedInferenceJobBuilder<'a, B, M, I, O, S, StateProvided>
pub fn with_state( self, state: S, ) -> StrappedInferenceJobBuilder<'a, B, M, I, O, S, StateProvided>
Provide state to the handler. Consumed exactly once during handler execution.
Source§impl<'a, B, M, I, O> StrappedInferenceJobBuilder<'a, B, M, I, O, (), StateMissing>
impl<'a, B, M, I, O> StrappedInferenceJobBuilder<'a, B, M, I, O, (), StateMissing>
Source§impl<'a, B, M, I, O, S> StrappedInferenceJobBuilder<'a, B, M, I, O, S, StateProvided>
impl<'a, B, M, I, O, S> StrappedInferenceJobBuilder<'a, B, M, I, O, S, StateProvided>
Auto Trait Implementations§
impl<'a, B, M, I, O, S, Flag> Freeze for StrappedInferenceJobBuilder<'a, B, M, I, O, S, Flag>
impl<'a, B, M, I, O, S, Flag> !RefUnwindSafe for StrappedInferenceJobBuilder<'a, B, M, I, O, S, Flag>
impl<'a, B, M, I, O, S, Flag> Send for StrappedInferenceJobBuilder<'a, B, M, I, O, S, Flag>
impl<'a, B, M, I, O, S, Flag> Sync for StrappedInferenceJobBuilder<'a, B, M, I, O, S, Flag>
impl<'a, B, M, I, O, S, Flag> Unpin for StrappedInferenceJobBuilder<'a, B, M, I, O, S, Flag>
impl<'a, B, M, I, O, S, Flag> !UnwindSafe for StrappedInferenceJobBuilder<'a, B, M, I, O, S, Flag>
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> 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