#[non_exhaustive]pub enum CallError {
Remote {
code: i64,
message: String,
data: Option<Value>,
},
Crashed(String),
Start(String),
Protocol(String),
Timeout(u64),
Transport(String),
}Expand description
Failure of one protocol call.
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.
Remote
The plugin answered with a JSON-RPC error.
Crashed(String)
The plugin process exited or the connection broke.
Start(String)
The plugin could not be started.
Protocol(String)
The plugin violated the protocol.
Timeout(u64)
The request timed out.
Transport(String)
Transport-level failure (HTTP).
Implementations§
Source§impl CallError
impl CallError
Sourcepub fn is_method_not_found(&self) -> bool
pub fn is_method_not_found(&self) -> bool
Whether this is a JSON-RPC “method not found” error.
Sourcepub fn into_node_error(self, plugin: &str) -> NodeError
pub fn into_node_error(self, plugin: &str) -> NodeError
Convert to a node error.
Trait Implementations§
Source§impl Error for CallError
impl Error for CallError
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 CallError
Auto Trait Implementations§
impl Forget for CallError
impl Freeze for CallError
impl Move for CallError
impl RefUnwindSafe for CallError
impl Send for CallError
impl Sync for CallError
impl Unpin for CallError
impl UnsafeUnpin for CallError
impl UnwindSafe for CallError
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