pub struct TransformContext { /* private fields */ }Expand description
Information handed to a transform when it is applied.
Implementations§
Source§impl TransformContext
impl TransformContext
Sourcepub fn fail(&self, error: Error)
pub fn fail(&self, error: Error)
Stops the call with an application-supplied transform error.
The first failure wins. End the transform’s output stream after this call; final-result waiters receive this error rather than cancellation.
Sourcepub fn stop(&self)
pub fn stop(&self)
Stops the call: the model stream and pending tool executions are
cancelled and the call ends with crate::Error::Cancelled. A
transform that stops the call should also end its output stream so
that no further events reach the consumer.
Trait Implementations§
Source§impl Clone for TransformContext
impl Clone for TransformContext
Source§fn clone(&self) -> TransformContext
fn clone(&self) -> TransformContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for TransformContext
impl !UnwindSafe for TransformContext
impl Freeze for TransformContext
impl Send for TransformContext
impl Sync for TransformContext
impl Unpin for TransformContext
impl UnsafeUnpin for TransformContext
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