pub struct FaultInjectingModel<M> { /* private fields */ }Expand description
Model wrapper applying one queued fault per invocation.
Trait Implementations§
Source§impl<M: Clone> Clone for FaultInjectingModel<M>
impl<M: Clone> Clone for FaultInjectingModel<M>
Source§fn clone(&self) -> FaultInjectingModel<M>
fn clone(&self) -> FaultInjectingModel<M>
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 moreSource§impl<M: Debug> Debug for FaultInjectingModel<M>
impl<M: Debug> Debug for FaultInjectingModel<M>
Source§impl<M> Model for FaultInjectingModel<M>where
M: Model,
impl<M> Model for FaultInjectingModel<M>where
M: Model,
Source§fn capabilities<'a>(
&'a self,
model: &'a ModelRef,
) -> ModelFuture<'a, Result<ModelCapabilities, ModelError>>
fn capabilities<'a>( &'a self, model: &'a ModelRef, ) -> ModelFuture<'a, Result<ModelCapabilities, ModelError>>
Resolves capabilities for a provider-qualified model.
Source§fn stream(
&self,
request: ModelRequest,
context: ModelCallContext,
) -> ModelFuture<'_, Result<ModelEventStream, ModelError>>
fn stream( &self, request: ModelRequest, context: ModelCallContext, ) -> ModelFuture<'_, Result<ModelEventStream, ModelError>>
Opens a canonical event stream for a request.
Source§fn invoke(
&self,
request: ModelRequest,
context: ModelCallContext,
) -> Pin<Box<dyn Future<Output = Result<ModelResponse, ModelError>> + Send + '_>>
fn invoke( &self, request: ModelRequest, context: ModelCallContext, ) -> Pin<Box<dyn Future<Output = Result<ModelResponse, ModelError>> + Send + '_>>
Invokes the model and reconstructs its terminal response.
Auto Trait Implementations§
impl<M> Freeze for FaultInjectingModel<M>where
M: Freeze,
impl<M> RefUnwindSafe for FaultInjectingModel<M>where
M: RefUnwindSafe,
impl<M> Send for FaultInjectingModel<M>where
M: Send,
impl<M> Sync for FaultInjectingModel<M>where
M: Sync,
impl<M> Unpin for FaultInjectingModel<M>where
M: Unpin,
impl<M> UnsafeUnpin for FaultInjectingModel<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for FaultInjectingModel<M>where
M: UnwindSafe,
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