pub struct AppendFailingMemory { /* private fields */ }Available on crate features
test-utils only.Expand description
Memory backend that loads empty history and always fails on append.
Implementations§
Source§impl AppendFailingMemory
impl AppendFailingMemory
Sourcepub fn new(message: impl Into<String>) -> AppendFailingMemory
pub fn new(message: impl Into<String>) -> AppendFailingMemory
Create an append-failing memory backend.
Trait Implementations§
Source§impl Clone for AppendFailingMemory
impl Clone for AppendFailingMemory
Source§fn clone(&self) -> AppendFailingMemory
fn clone(&self) -> AppendFailingMemory
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 ConversationMemory for AppendFailingMemory
impl ConversationMemory for AppendFailingMemory
Source§fn load<'a>(
&'a self,
_conversation_id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>, MemoryError>> + Send + 'a>>
fn load<'a>( &'a self, _conversation_id: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Message>, MemoryError>> + Send + 'a>>
Load the full conversation history for
conversation_id. Read moreSource§impl Default for AppendFailingMemory
impl Default for AppendFailingMemory
Source§fn default() -> AppendFailingMemory
fn default() -> AppendFailingMemory
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AppendFailingMemory
impl RefUnwindSafe for AppendFailingMemory
impl Send for AppendFailingMemory
impl Sync for AppendFailingMemory
impl Unpin for AppendFailingMemory
impl UnsafeUnpin for AppendFailingMemory
impl UnwindSafe for AppendFailingMemory
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