pub struct FailingMemory { /* private fields */ }Available on crate features
test-utils only.Expand description
Memory backend that always fails on load and no-ops append and clear.
Implementations§
Source§impl FailingMemory
impl FailingMemory
Sourcepub fn new(message: impl Into<String>) -> FailingMemory
pub fn new(message: impl Into<String>) -> FailingMemory
Create a load-failing memory backend.
Trait Implementations§
Source§impl Clone for FailingMemory
impl Clone for FailingMemory
Source§fn clone(&self) -> FailingMemory
fn clone(&self) -> FailingMemory
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 FailingMemory
impl ConversationMemory for FailingMemory
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 FailingMemory
impl Default for FailingMemory
Source§fn default() -> FailingMemory
fn default() -> FailingMemory
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FailingMemory
impl RefUnwindSafe for FailingMemory
impl Send for FailingMemory
impl Sync for FailingMemory
impl Unpin for FailingMemory
impl UnsafeUnpin for FailingMemory
impl UnwindSafe for FailingMemory
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