pub enum TranscriptEditError {
MessageIndexOutOfBounds {
message_index: usize,
message_count: usize,
},
BlockIndexOutOfBounds {
block_kind: &'static str,
block_index: usize,
block_count: usize,
},
MessageRoleMismatch {
message_index: usize,
expected: &'static str,
actual: &'static str,
},
InvalidRewriteRange {
start: usize,
end: usize,
message_count: usize,
},
NoOpRewrite {
revision: String,
},
RevisionConflict {
expected: String,
actual: String,
},
HistoryStateMalformed(String),
InvalidTranscriptShape(String),
}Expand description
Invalid typed transcript edit request.
Variants§
MessageIndexOutOfBounds
BlockIndexOutOfBounds
MessageRoleMismatch
InvalidRewriteRange
NoOpRewrite
RevisionConflict
HistoryStateMalformed(String)
InvalidTranscriptShape(String)
Implementations§
Source§impl TranscriptEditError
impl TranscriptEditError
Sourcepub fn into_session_error(self) -> SessionError
pub fn into_session_error(self) -> SessionError
Convert a typed edit validation failure into a surface-friendly session
error without widening the SessionService error enum.
Trait Implementations§
Source§impl Clone for TranscriptEditError
impl Clone for TranscriptEditError
Source§fn clone(&self) -> TranscriptEditError
fn clone(&self) -> TranscriptEditError
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 TranscriptEditError
impl Debug for TranscriptEditError
Source§impl Display for TranscriptEditError
impl Display for TranscriptEditError
Source§impl Error for TranscriptEditError
impl Error for TranscriptEditError
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()
Auto Trait Implementations§
impl Freeze for TranscriptEditError
impl RefUnwindSafe for TranscriptEditError
impl Send for TranscriptEditError
impl Sync for TranscriptEditError
impl Unpin for TranscriptEditError
impl UnsafeUnpin for TranscriptEditError
impl UnwindSafe for TranscriptEditError
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