pub enum AssistantDocumentEditError {
EmptyOldString {
ordinal: usize,
},
Absent {
ordinal: usize,
preview: String,
},
Ambiguous {
ordinal: usize,
matches: usize,
preview: String,
},
}Expand description
Why a batch of edits could not be applied.
Phrased around the ordinal (one-based, the position in the submitted batch) because the caller is a model reading its own batch back: “edit 2” is how it finds the operation it wrote.
Variants§
EmptyOldString
The edit’s old_string is empty, which matches nothing and everything.
Absent
The edit’s old_string does not occur in the document.
Fields
Ambiguous
The edit’s old_string occurs more than once, so it does not say which
occurrence it means.
Trait Implementations§
Source§impl Clone for AssistantDocumentEditError
impl Clone for AssistantDocumentEditError
Source§fn clone(&self) -> AssistantDocumentEditError
fn clone(&self) -> AssistantDocumentEditError
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 AssistantDocumentEditError
impl Debug for AssistantDocumentEditError
Source§impl Display for AssistantDocumentEditError
impl Display for AssistantDocumentEditError
impl Eq for AssistantDocumentEditError
Source§impl Error for AssistantDocumentEditError
impl Error for AssistantDocumentEditError
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()
impl StructuralPartialEq for AssistantDocumentEditError
Auto Trait Implementations§
impl Freeze for AssistantDocumentEditError
impl RefUnwindSafe for AssistantDocumentEditError
impl Send for AssistantDocumentEditError
impl Sync for AssistantDocumentEditError
impl Unpin for AssistantDocumentEditError
impl UnsafeUnpin for AssistantDocumentEditError
impl UnwindSafe for AssistantDocumentEditError
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