#[non_exhaustive]pub enum FromMessagesError {
LengthMismatch {
messages: usize,
pinned: usize,
},
}Expand description
Returned by ConversationSnapshot::new and
History::from_messages when the supplied parallel
vectors are inconsistent. Surfaces at restore time so a malformed
snapshot fails loudly instead of corrupting state silently.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LengthMismatch
messages and pinned were not the same length. Both fields
carry the observed lengths so callers can report the exact
mismatch.
Trait Implementations§
Source§impl Debug for FromMessagesError
impl Debug for FromMessagesError
Source§impl Display for FromMessagesError
impl Display for FromMessagesError
Source§impl Error for FromMessagesError
impl Error for FromMessagesError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for FromMessagesError
impl PartialEq for FromMessagesError
Source§fn eq(&self, other: &FromMessagesError) -> bool
fn eq(&self, other: &FromMessagesError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for FromMessagesError
impl StructuralPartialEq for FromMessagesError
Auto Trait Implementations§
impl Freeze for FromMessagesError
impl RefUnwindSafe for FromMessagesError
impl Send for FromMessagesError
impl Sync for FromMessagesError
impl Unpin for FromMessagesError
impl UnsafeUnpin for FromMessagesError
impl UnwindSafe for FromMessagesError
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