pub struct MockBackend {
pub reply_template: String,
}Fields§
§reply_template: StringImplementations§
Trait Implementations§
Source§impl Clone for MockBackend
impl Clone for MockBackend
Source§fn clone(&self) -> MockBackend
fn clone(&self) -> MockBackend
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 Debug for MockBackend
impl Debug for MockBackend
Source§impl Default for MockBackend
impl Default for MockBackend
Source§fn default() -> MockBackend
fn default() -> MockBackend
Returns the “default value” for a type. Read more
Source§impl LlmBackend for MockBackend
impl LlmBackend for MockBackend
Source§fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_model: &'life1 str,
messages: &'life2 [Message],
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_model: &'life1 str,
messages: &'life2 [Message],
) -> Pin<Box<dyn Future<Output = Result<Message>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Single-shot completion. Implementations MAY buffer a streamed
response internally — see
stream for the streamed
API.Source§fn stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_model: &'life1 str,
messages: &'life2 [Message],
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, Result<Message>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_model: &'life1 str,
messages: &'life2 [Message],
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, Result<Message>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Streamed completion. Yields incremental
Message deltas; the last
delta has the final assistant turn.Auto Trait Implementations§
impl Freeze for MockBackend
impl RefUnwindSafe for MockBackend
impl Send for MockBackend
impl Sync for MockBackend
impl Unpin for MockBackend
impl UnsafeUnpin for MockBackend
impl UnwindSafe for MockBackend
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