pub enum VineError {
Show 14 variants
ClientNotConnected(String),
ConnectionFailed {
SideCarIdentifier: String,
Address: String,
Reason: String,
},
ConnectionLost(String),
RPCError(String),
RequestTimeout {
SideCarIdentifier: String,
MethodName: String,
TimeoutMilliseconds: u64,
},
RequestCanceled {
SideCarIdentifier: String,
MethodName: String,
},
SerializationError(Error),
MessageTooLarge {
ActualSize: usize,
MaxSize: usize,
},
InvalidMessageFormat(String),
TonicTransportError(Error),
InternalLockError(String),
InvalidState(String),
InvalidUri(InvalidUri),
AddressParseError(AddrParseError),
}Expand description
A comprehensive error enum for the Vine IPC layer.
Each variant carries detailed context so callers can choose between retry, fallback, and surface-to-user strategies.
Variants§
ClientNotConnected(String)
A gRPC client channel for the specified sidecar could not be found or is not ready in the connection pool.
ConnectionFailed
Failed to establish a connection to the specified sidecar.
ConnectionLost(String)
An established connection to the sidecar was lost.
RPCError(String)
An RPC call to a sidecar failed with a specific gRPC status.
RequestTimeout
A request did not receive a response within the configured timeout.
RequestCanceled
A request was explicitly cancelled before completion.
SerializationError(Error)
An error occurred while serializing or deserializing a JSON payload.
MessageTooLarge
Message exceeded the maximum allowed size.
InvalidMessageFormat(String)
Message format validation failed.
TonicTransportError(Error)
A low-level error occurred in the tonic gRPC transport layer.
InternalLockError(String)
A shared state mutex was “poisoned,” indicating a panic in another thread while holding the lock.
InvalidState(String)
Invalid internal state detected - the system reached an unexpected state that should never happen during normal operation.
InvalidUri(InvalidUri)
An error occurred from an invalid URI.
AddressParseError(AddrParseError)
An error occurred while parsing a socket address.
Implementations§
Source§impl VineError
impl VineError
Sourcepub fn IsRecoverable(&self) -> bool
pub fn IsRecoverable(&self) -> bool
Returns true when the error is recoverable (the caller can sensibly
retry the operation).
Sourcepub fn ToTonicStatus(&self) -> Status
pub fn ToTonicStatus(&self) -> Status
Maps the error to a tonic::Status suitable for a gRPC error response.
Trait Implementations§
Source§impl Error for VineError
impl Error for VineError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<AddrParseError> for VineError
impl From<AddrParseError> for VineError
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Source§impl<T> From<PoisonError<MutexGuard<'_, T>>> for VineError
impl<T> From<PoisonError<MutexGuard<'_, T>>> for VineError
Source§fn from(Error: PoisonError<MutexGuard<'_, T>>) -> Self
fn from(Error: PoisonError<MutexGuard<'_, T>>) -> Self
Auto Trait Implementations§
impl Freeze for VineError
impl !RefUnwindSafe for VineError
impl Send for VineError
impl Sync for VineError
impl Unpin for VineError
impl UnsafeUnpin for VineError
impl !UnwindSafe for VineError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].