#[non_exhaustive]pub enum CopilotRequestError {
ConnectionClosed,
InvalidState(String),
Upstream(String),
Handler(String),
Rpc(Error),
}Expand description
Error returned by a CopilotRequestHandler hook or the response stream.
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.
ConnectionClosed
The response was used after the RPC connection to the runtime closed.
InvalidState(String)
The response state machine was violated (for example start called
twice, or a write before start).
Upstream(String)
An upstream transport failure while forwarding the request.
Handler(String)
A failure surfaced by the consumer’s own handler.
Rpc(Error)
An RPC error talking to the runtime.
Implementations§
Trait Implementations§
Source§impl Debug for CopilotRequestError
impl Debug for CopilotRequestError
Source§impl Display for CopilotRequestError
impl Display for CopilotRequestError
Source§impl Error for CopilotRequestError
impl Error for CopilotRequestError
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 !RefUnwindSafe for CopilotRequestError
impl !UnwindSafe for CopilotRequestError
impl Freeze for CopilotRequestError
impl Send for CopilotRequestError
impl Sync for CopilotRequestError
impl Unpin for CopilotRequestError
impl UnsafeUnpin for CopilotRequestError
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