#[non_exhaustive]pub enum Error {
Transport(TransportError),
Protocol(ProtocolError),
Environment(EnvError),
Model(ModelError),
Timeout(Duration),
Cancelled(String),
Client(ClientError),
}Expand description
Top-level error type for rlmesh-grpc operations.
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.
Transport(TransportError)
Transport-level error (connection, I/O, etc.)
Protocol(ProtocolError)
Protocol-level error (encoding, framing, etc.)
Environment(EnvError)
Environment error (from the environment itself)
Model(ModelError)
Model error (from a served model handler)
Timeout(Duration)
Operation timed out
Cancelled(String)
Operation was cancelled
Client(ClientError)
Client error
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this error is recoverable (can retry).
Sourcepub fn is_fatal_handshake(&self) -> bool
pub fn is_fatal_handshake(&self) -> bool
A permanent handshake incompatibility (protocol/edition/SHA-pin mismatch) that retrying cannot fix, vs a transient connect error while a server binds.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<ClientError> for Error
impl From<ClientError> for Error
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
Converts to this type from the input type.
Source§impl From<ModelError> for Error
impl From<ModelError> for Error
Source§fn from(source: ModelError) -> Self
fn from(source: ModelError) -> Self
Converts to this type from the input type.
Source§impl From<ProtocolError> for Error
impl From<ProtocolError> for Error
Source§fn from(source: ProtocolError) -> Self
fn from(source: ProtocolError) -> Self
Converts to this type from the input type.
Source§impl From<TransportError> for Error
impl From<TransportError> for Error
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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