#[non_exhaustive]pub enum InvocationError {
Validation(ValidationError),
Timeout,
Ser(Error),
SerdeJson(Error),
Deser(Error),
Network(NetworkError),
Chunking(String),
Malformed(String),
Unexpected(String),
}
Expand description
Errors that can occur when sending or receiving an invocation, including the dispatch
method
of the provider.
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.
Validation(ValidationError)
Indicates that validation for the invocation failed
Timeout
The invocation or dispatch timed out
Ser(Error)
The invocation or dispatch failed when serializing data from the wire
SerdeJson(Error)
Serialization/Deserializing errors that occur for JSON
Deser(Error)
The invocation or dispatch failed when deserializing data from the wire
Network(NetworkError)
An error that occurred when trying to publish or request over NATS
Chunking(String)
Errors that occur when chunking data
Malformed(String)
Returned when an invocation is malformed (e.g. has a method type that isn’t supported)
Unexpected(String)
Returned when an invocation returns an error
Trait Implementations§
source§impl Debug for InvocationError
impl Debug for InvocationError
source§impl Display for InvocationError
impl Display for InvocationError
source§impl Error for InvocationError
impl Error for InvocationError
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()
source§impl From<Error> for InvocationError
impl From<Error> for InvocationError
source§impl From<Error> for InvocationError
impl From<Error> for InvocationError
source§impl From<Error> for InvocationError
impl From<Error> for InvocationError
source§impl From<NetworkError> for InvocationError
impl From<NetworkError> for InvocationError
source§fn from(source: NetworkError) -> Self
fn from(source: NetworkError) -> Self
Converts to this type from the input type.
source§impl From<ValidationError> for InvocationError
impl From<ValidationError> for InvocationError
source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InvocationError
impl !RefUnwindSafe for InvocationError
impl Send for InvocationError
impl Sync for InvocationError
impl Unpin for InvocationError
impl !UnwindSafe for InvocationError
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> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request