pub struct GuidedError;Expand description
Builder for creating guided JSON-RPC errors
Implementations§
Source§impl GuidedError
impl GuidedError
Sourcepub fn parse_error(message: &str) -> ErrorObjectOwned
pub fn parse_error(message: &str) -> ErrorObjectOwned
Parse error - client sent non-JSON-RPC content
Sourcepub fn invalid_request(message: &str) -> ErrorObjectOwned
pub fn invalid_request(message: &str) -> ErrorObjectOwned
Invalid request - malformed JSON-RPC request
Sourcepub fn activation_not_found(
activation: &str,
available: Vec<String>,
) -> ErrorObjectOwned
pub fn activation_not_found( activation: &str, available: Vec<String>, ) -> ErrorObjectOwned
Activation not found - the namespace doesn’t exist
Sourcepub fn method_not_found(
activation: &str,
method: &str,
available_methods: Vec<String>,
example_method: Option<(&str, Vec<Value>)>,
) -> ErrorObjectOwned
pub fn method_not_found( activation: &str, method: &str, available_methods: Vec<String>, example_method: Option<(&str, Vec<Value>)>, ) -> ErrorObjectOwned
Method not found - the activation exists but not the method
Sourcepub fn invalid_params(
method: &str,
message: &str,
usage: Option<&str>,
example: Option<TryRequest>,
) -> ErrorObjectOwned
pub fn invalid_params( method: &str, message: &str, usage: Option<&str>, example: Option<TryRequest>, ) -> ErrorObjectOwned
Invalid params - the method exists but params are wrong
Sourcepub fn internal_error(message: &str) -> ErrorObjectOwned
pub fn internal_error(message: &str) -> ErrorObjectOwned
Internal/execution error
Auto Trait Implementations§
impl Freeze for GuidedError
impl RefUnwindSafe for GuidedError
impl Send for GuidedError
impl Sync for GuidedError
impl Unpin for GuidedError
impl UnsafeUnpin for GuidedError
impl UnwindSafe for GuidedError
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