#[non_exhaustive]pub enum PeerError {
Send(String),
Check {
task_id: String,
error: String,
},
UnknownTask,
Abandoned {
task_id: String,
canceled: Result<(), String>,
},
Unrecognized,
}Expand description
Why an exchange has no outcome.
Text in these is safe to show the model: a peer puts no server body and no credential in it.
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.
Send(String)
The request itself failed; nothing is known to be running.
Check
Checking on a task failed; it may still be running.
UnknownTask
The agent does not know the task asked about.
Abandoned
The run was cancelled while the task ran, and the task was asked to cancel — with how that went.
Unrecognized
The agent answered in a way the peer does not understand.
Trait Implementations§
impl Eq for PeerError
Source§impl Error for PeerError
impl Error for PeerError
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 PeerError
Auto Trait Implementations§
impl Freeze for PeerError
impl RefUnwindSafe for PeerError
impl Send for PeerError
impl Sync for PeerError
impl Unpin for PeerError
impl UnsafeUnpin for PeerError
impl UnwindSafe for PeerError
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