Enum toy_rpc::error::Error [−][src]
pub enum Error { IoError(Error), ParseError(Box<dyn Error + Send + Sync>), Internal(Box<dyn Error + Send + Sync>), InvalidArgument, ServiceNotFound, MethodNotFound, ExecutionError(String), Canceled(Option<MessageId>), Timeout(Option<MessageId>), }
Expand description
Custom error type
Variants
IoError(Error)
Errors with IO including that from the transport layer
Errors with serialization/deserialization
Errors with server or client
The supplied argument for the function is invalid
The specified service is not found on server side
The specified method is not found on the specified service
ExecutionError(String)
Execution error returned by RPC method
Cancellation error when an RPC call is cancelled
Timeout error when an RPC request timesout
The timeout is tracked independently on the client and the server. Thus, the situation where a response comes back to the client just at the moment of timeout could happen and may still result in a timeout error.
Trait Implementations
Convert from bincode::Error to the custom Error
Convert from serde_json::Error to the custom Error
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V