Expand description
ScriptError-aware extension helpers for ff_core::EngineError.
RFC-012 Stage 1a: the enum types live in ff-core so the
EngineBackend trait can name them without ff-core depending on
ff-script. The ScriptError-downcast logic cannot live in ff-core
(naming ScriptError would require ff-core → ff-script, wrong
direction). This module owns:
impl From<ScriptError> for EngineError— the full mapping.transport_script/transport_script_ref— construct a Valkey-tagged Transport variant from aScriptErrorand downcast the boxed source back toScriptErrorrespectively.- [
valkey_kind] — inspect the innerferriskey::ErrorKindwhen the Transport variant carries aScriptError::Valkey. class— upgrade ff-core’s defaultTerminalclassification of Transport into the correct Phase-1 classification by delegating toScriptError::class.
Functions§
- class
- Classification of
errusing the ScriptError-aware table. - transport_
script - Construct a Valkey-backed
Transportfrom aScriptError. Preferred over struct-literal construction so thebackendtag stays consistent across Valkey call sites. - transport_
script_ ref - If
erris aTransportcarrying aScriptError, return a reference to the inner script error. ReturnsNonefor other variants and for Transport whose inner source is not aScriptError(e.g. a Postgres-backed transport error).