#[non_exhaustive]pub enum SessionOpError {
StreamingWithoutBehavior,
NoModel(String),
NoApiKey {
provider: String,
message: String,
},
CommandNotAllowed(String),
CompactionInProgress,
SessionLocked(String),
CommandContextRequired,
Failed(String),
}Expand description
Failure of a session operation (fixed error texts).
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.
StreamingWithoutBehavior
prompt while streaming without streaming_behavior.
NoModel(String)
No model selected.
NoApiKey
No credentials for the provider.
CommandNotAllowed(String)
An extension command cannot be queued.
CompactionInProgress
Prompt during manual compaction.
SessionLocked(String)
Another runner holds the single-writer lease and did not respond to the takeover request (D-LOCK / D-TAKEOVER); the text names the holder.
CommandContextRequired
Session-replacing operations need a command context.
Failed(String)
Any other failure.
Trait Implementations§
Source§impl Clone for SessionOpError
impl Clone for SessionOpError
Source§impl Debug for SessionOpError
impl Debug for SessionOpError
Source§impl Display for SessionOpError
impl Display for SessionOpError
impl Eq for SessionOpError
Source§impl Error for SessionOpError
impl Error for SessionOpError
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 SessionOpError
impl PartialEq for SessionOpError
impl StructuralPartialEq for SessionOpError
Auto Trait Implementations§
impl Freeze for SessionOpError
impl RefUnwindSafe for SessionOpError
impl Send for SessionOpError
impl Sync for SessionOpError
impl Unpin for SessionOpError
impl UnsafeUnpin for SessionOpError
impl UnwindSafe for SessionOpError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.