pub enum CopilotError {
Show 13 variants
JsonRpc {
code: i32,
message: String,
data: Option<Value>,
},
Serialization(String),
ConnectionClosed,
Timeout(u64),
Io(String),
Protocol(String),
NotConnected,
Configuration(String),
ProcessSpawn(String),
Connection(String),
ProtocolMismatch {
expected: u32,
actual: Option<u32>,
},
SessionError(String),
NoHandler(String),
}Expand description
Error types for the Copilot SDK.
Variants§
JsonRpc
JSON-RPC error response from the server.
Serialization(String)
Serialization/deserialization error.
ConnectionClosed
Connection closed unexpectedly.
Timeout(u64)
Request timed out.
Io(String)
I/O error.
Protocol(String)
Protocol error (malformed messages, etc.).
NotConnected
Client not connected.
Configuration(String)
Configuration error.
ProcessSpawn(String)
Failed to spawn CLI process.
Connection(String)
Connection failed.
ProtocolMismatch
Protocol version mismatch.
SessionError(String)
Session-related error.
NoHandler(String)
No handler registered for a request.
Trait Implementations§
Source§impl Debug for CopilotError
impl Debug for CopilotError
Source§impl Display for CopilotError
impl Display for CopilotError
Source§impl Error for CopilotError
impl Error for CopilotError
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 CopilotError
impl RefUnwindSafe for CopilotError
impl Send for CopilotError
impl Sync for CopilotError
impl Unpin for CopilotError
impl UnsafeUnpin for CopilotError
impl UnwindSafe for CopilotError
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