pub struct InferenceWriter<O> { /* private fields */ }Expand description
Communication channel for an inference task, allowing the app to send outputs and errors back to the session.
Implementations§
Source§impl<O> InferenceWriter<O>
impl<O> InferenceWriter<O>
pub fn with_observer(self, observer: Arc<dyn InferenceWriterObserver>) -> Self
Sourcepub fn write(&self, output: O) -> Result<(), InferenceWriterError>
pub fn write(&self, output: O) -> Result<(), InferenceWriterError>
Respond with an output item. This can be called multiple times to emit multiple items.
Trait Implementations§
Auto Trait Implementations§
impl<O> !Freeze for InferenceWriter<O>
impl<O> !RefUnwindSafe for InferenceWriter<O>
impl<O> !Send for InferenceWriter<O>
impl<O> !Sync for InferenceWriter<O>
impl<O> Unpin for InferenceWriter<O>
impl<O> UnsafeUnpin for InferenceWriter<O>
impl<O> !UnwindSafe for InferenceWriter<O>
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