pub struct ErrorCode {
pub code: i32,
pub message: &'static str,
}Expand description
Predefined error codes for common JSON-RPC and ACP-specific errors.
These codes follow the JSON-RPC 2.0 specification for standard errors and use the reserved range (-32000 to -32099) for protocol-specific errors.
Fields§
§code: i32The numeric error code.
message: &'static strThe standard error message for this code.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const PARSE_ERROR: ErrorCode
pub const PARSE_ERROR: ErrorCode
Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
Sourcepub const INVALID_REQUEST: ErrorCode
pub const INVALID_REQUEST: ErrorCode
The JSON sent is not a valid Request object.
Sourcepub const METHOD_NOT_FOUND: ErrorCode
pub const METHOD_NOT_FOUND: ErrorCode
The method does not exist or is not available.
Sourcepub const INVALID_PARAMS: ErrorCode
pub const INVALID_PARAMS: ErrorCode
Invalid method parameter(s).
Sourcepub const INTERNAL_ERROR: ErrorCode
pub const INTERNAL_ERROR: ErrorCode
Internal JSON-RPC error. Reserved for implementation-defined server errors.
Sourcepub const AUTH_REQUIRED: ErrorCode
pub const AUTH_REQUIRED: ErrorCode
Authentication is required before this operation can be performed. This is an ACP-specific error code in the reserved range.
Trait Implementations§
Source§impl Deserialize<'static> for ErrorCode
impl Deserialize<'static> for ErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ErrorCode
impl JsonSchema for ErrorCode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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