#[non_exhaustive]#[repr(i32)]pub enum RpcErrorKind {
InvalidRequest = -32_600,
NoSuchMethod = -32_601,
InvalidMethodParameters = -32_602,
InternalError = -32_603,
ObjectNotFound = 1,
RequestError = 2,
MethodNotImpl = 3,
RequestCancelled = 4,
FeatureNotPresent = 5,
}
Expand description
Error kinds for RPC errors.
Unlike tor_error::ErrorKind
,
these codes do not represent a problem in an Arti function per se:
they are only visible to the RPC system, and should only be reported there.
For backward compatibility with json-rpc, each of these codes has a unique numeric ID.
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.
InvalidRequest = -32_600
“The JSON sent is not a valid Request object.”
NoSuchMethod = -32_601
“The method does not exist.”
InvalidMethodParameters = -32_602
“Invalid method parameter(s).”
InternalError = -32_603
“The server suffered some kind of internal problem”
ObjectNotFound = 1
“Some requested object was not valid”
RequestError = 2
“Some other error occurred”
MethodNotImpl = 3
This method exists, but wasn’t implemented on this object.
RequestCancelled = 4
This request was cancelled before it could finish.
FeatureNotPresent = 5
This request listed a required feature that doesn’t exist.
Trait Implementations§
Source§impl Clone for RpcErrorKind
impl Clone for RpcErrorKind
Source§fn clone(&self) -> RpcErrorKind
fn clone(&self) -> RpcErrorKind
Returns a copy 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 RpcErrorKind
impl Debug for RpcErrorKind
Source§impl PartialEq for RpcErrorKind
impl PartialEq for RpcErrorKind
impl Copy for RpcErrorKind
impl Eq for RpcErrorKind
impl StructuralPartialEq for RpcErrorKind
Auto Trait Implementations§
impl Freeze for RpcErrorKind
impl RefUnwindSafe for RpcErrorKind
impl Send for RpcErrorKind
impl Sync for RpcErrorKind
impl Unpin for RpcErrorKind
impl UnwindSafe for RpcErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.