rlmesh::Error
The error type for every fallible operation in this crate.
enum ErrorEach variant identifies an error class (see ErrorClass); a subclass
with no variant of its own uses its parent’s, and Error::class
reports the exact class. Display formats the message.
Error::is_recoverable reports whether the session remains usable.
Variants
- InternalAn internal or server-side failure (
RLMeshException). - ProtocolA protocol failure: generation mismatch, refused edition, failed handshake or malformed message (
ProtocolException). - EnvironmentThe environment reported a failure; see
EnvironmentError(EnvironmentException, orRecoverableEnvironmentExceptionwhen recoverable). - ModelThe model reported a failure; see
ModelError(ModelException). - InvalidArgumentAn invalid argument value, address or options field (
ValueError, orAdapterResolutionError). - TypeThe wrong kind of value or object (
TypeError). - RuntimeMisuse (closed handle, overlapping call, ...) or a local refusal (builtin
RuntimeError). - OsA filesystem failure (
OSError). - ConnectionA transport failure (
ConnectionError). - TimeoutA connect or request deadline (
TimeoutError). - CancelledThe call was cancelled (
KeyboardInterrupt).
Associated functions
- model()Construct a non-recoverable model failure (
ModelException, codeInternal). - model_recoverable()Construct a recoverable model failure (code
Internal; the caller may retry). - environment()Construct a non-recoverable environment failure (
EnvironmentException, codeInternal). - environment_recoverable()Construct a recoverable environment failure (
RecoverableEnvironmentException, codeInternal). - invalid_argument()Construct an invalid-argument error (
ValueError). - adapter_resolution()Tags that do not fit their spaces (
AdapterResolutionError).
Methods
Internal
variant[source]Internal(String)An internal or server-side failure (RLMeshException).
Protocol
variant[source]Protocol(String)A protocol failure: generation mismatch, refused edition, failed
handshake or malformed message (ProtocolException).
Environment
variant[source]Environment(EnvironmentError)The environment reported a failure; see EnvironmentError
(EnvironmentException, or RecoverableEnvironmentException when
recoverable).
Model
variant[source]Model(ModelError)The model reported a failure; see ModelError (ModelException).
InvalidArgument
variant[source]InvalidArgument(InvalidArgumentError)An invalid argument value, address or options field (ValueError, or
AdapterResolutionError).
Type
variant[source]Type(String)The wrong kind of value or object (TypeError).
Runtime
variant[source]Runtime(String)Misuse (closed handle, overlapping call, …) or a local refusal
(builtin RuntimeError).
Os
variant[source]Os(String)A filesystem failure (OSError).
Connection
variant[source]Connection(String)A transport failure (ConnectionError).
Timeout
variant[source]Timeout(std::time::Duration)A connect or request deadline (TimeoutError).
Cancelled
variant[source]CancelledThe call was cancelled (KeyboardInterrupt).
model
associated function[source]fn model(message: impl Into<String>) -> SelfConstruct a non-recoverable model failure (ModelException, code
Internal).
Use this from a crate::binding::model::ModelHandler::predict
implementation to signal that the model declined the request (e.g. a
malformed observation), rather than misreporting it as an
internal/transport fault.
model_recoverable
associated function[source]fn model_recoverable(message: impl Into<String>) -> SelfConstruct a recoverable model failure (code Internal; the caller
may retry).
environment
associated function[source]fn environment(message: impl Into<String>) -> SelfConstruct a non-recoverable environment failure
(EnvironmentException, code Internal).
environment_recoverable
associated function[source]fn environment_recoverable(message: impl Into<String>) -> SelfConstruct a recoverable environment failure
(RecoverableEnvironmentException, code Internal).
invalid_argument
associated function[source]fn invalid_argument(message: impl Into<String>) -> SelfConstruct an invalid-argument error (ValueError).
adapter_resolution
associated function[source]fn adapter_resolution(message: impl Into<String>) -> SelfTags that do not fit their spaces (AdapterResolutionError).
class
method[source]fn class(&self) -> ErrorClassThe exact exception class this error reports.
is_recoverable
method[source]fn is_recoverable(&self) -> boolWhether the session remains usable: the Environment or Model error’s own flag, and false for every other class.
Trait implementations
- impl<E> From<TagError<E>> for Error
- impl Debug for Error
- impl Clone for Error
- impl StructuralPartialEq for Error
- impl PartialEq for Error
- impl Eq for Error
- impl Display for Error
- impl Error for Error