This reference describes unreleased code on main; no release documents it yet.

rlmesh::Error

enumPreviewuse rlmesh::Error;[source]

The error type for every fallible operation in this crate.

enum Error

Each 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

Associated functions

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]
Cancelled

The call was cancelled (KeyboardInterrupt).

model

associated function[source]
fn model(message: impl Into<String>) -> Self

Construct 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>) -> Self

Construct a recoverable model failure (code Internal; the caller may retry).

environment

associated function[source]
fn environment(message: impl Into<String>) -> Self

Construct a non-recoverable environment failure (EnvironmentException, code Internal).

environment_recoverable

associated function[source]
fn environment_recoverable(message: impl Into<String>) -> Self

Construct a recoverable environment failure (RecoverableEnvironmentException, code Internal).

invalid_argument

associated function[source]
fn invalid_argument(message: impl Into<String>) -> Self

Construct an invalid-argument error (ValueError).

adapter_resolution

associated function[source]
fn adapter_resolution(message: impl Into<String>) -> Self

Tags that do not fit their spaces (AdapterResolutionError).

class

method[source]
fn class(&self) -> ErrorClass

The exact exception class this error reports.

is_recoverable

method[source]
fn is_recoverable(&self) -> bool

Whether 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