Enum conjure_runtime::ServiceError
source · [−]#[non_exhaustive]
pub enum ServiceError {
WrapInNewError,
PropagateToCaller,
}Expand description
Specifies the behavior of the client in response to a service error from a server.
Service errors are encoded as responses with a 4xx or 5xx response code and a body containing a SerializableError.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
WrapInNewError
The service error will be propagated as a new internal service error.
The error’s cause will contain the information about the received service error, but the error constructed by the client will have a different error instance ID, type, etc.
This is the default behavior.
PropagateToCaller
The service error will be transparently propagated without change.
This is designed for use when proxying a request to another node, commonly of the same service. By preserving the original error’s instance ID, type, etc, the upstream service will be able to process the error properly.
Trait Implementations
sourceimpl Clone for ServiceError
impl Clone for ServiceError
sourcefn clone(&self) -> ServiceError
fn clone(&self) -> ServiceError
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for ServiceError
impl Debug for ServiceError
sourceimpl PartialEq<ServiceError> for ServiceError
impl PartialEq<ServiceError> for ServiceError
sourcefn eq(&self, other: &ServiceError) -> bool
fn eq(&self, other: &ServiceError) -> bool
impl Copy for ServiceError
impl Eq for ServiceError
impl StructuralEq for ServiceError
impl StructuralPartialEq for ServiceError
Auto Trait Implementations
impl RefUnwindSafe for ServiceError
impl Send for ServiceError
impl Sync for ServiceError
impl Unpin for ServiceError
impl UnwindSafe for ServiceError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.