pub enum PromptRunError {
Rpc(RpcError),
Runtime(RuntimeError),
TurnFailedWithContext(PromptTurnFailure),
TurnFailed,
TurnInterrupted,
Timeout(Duration),
TurnCompletedWithoutAssistantText(PromptTurnFailure),
EmptyAssistantText,
AttachmentNotFound(String),
BlockedByHook {
hook_name: String,
phase: HookPhase,
message: String,
},
}Variants§
Rpc(RpcError)
Runtime(RuntimeError)
TurnFailedWithContext(PromptTurnFailure)
TurnFailed
TurnInterrupted
Timeout(Duration)
TurnCompletedWithoutAssistantText(PromptTurnFailure)
EmptyAssistantText
AttachmentNotFound(String)
BlockedByHook
A pre-hook explicitly blocked execution before any RPC was sent.
Trait Implementations§
Source§impl Clone for PromptRunError
impl Clone for PromptRunError
Source§fn clone(&self) -> PromptRunError
fn clone(&self) -> PromptRunError
Returns a duplicate of the value. Read more
1.0.0 · 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 PromptRunError
impl Debug for PromptRunError
Source§impl Display for PromptRunError
impl Display for PromptRunError
Source§impl Error for PromptRunError
impl Error for PromptRunError
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 From<RpcError> for PromptRunError
impl From<RpcError> for PromptRunError
Source§impl From<RuntimeError> for PromptRunError
impl From<RuntimeError> for PromptRunError
Source§fn from(source: RuntimeError) -> Self
fn from(source: RuntimeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PromptRunError
impl PartialEq for PromptRunError
impl Eq for PromptRunError
impl StructuralPartialEq for PromptRunError
Auto Trait Implementations§
impl Freeze for PromptRunError
impl RefUnwindSafe for PromptRunError
impl Send for PromptRunError
impl Sync for PromptRunError
impl Unpin for PromptRunError
impl UnsafeUnpin for PromptRunError
impl UnwindSafe for PromptRunError
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