pub struct FakeModel {
outcomes: Mutex<VecDeque<ModelResult<ModelResponse>>>,
}Fields§
§outcomes: Mutex<VecDeque<ModelResult<ModelResponse>>>Implementations§
Source§impl FakeModel
impl FakeModel
pub fn new( outcomes: impl IntoIterator<Item = ModelResult<ModelResponse>>, ) -> Self
Trait Implementations§
Source§impl ModelProvider for FakeModel
impl ModelProvider for FakeModel
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ModelRequest,
) -> Pin<Box<dyn Future<Output = ModelResult<ModelResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for FakeModel
impl RefUnwindSafe for FakeModel
impl Send for FakeModel
impl Sync for FakeModel
impl Unpin for FakeModel
impl UnsafeUnpin for FakeModel
impl UnwindSafe for FakeModel
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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