#[non_exhaustive]pub enum StateError {
Show 23 variants
EmptySchemaId,
SchemaIdTooLong {
max_bytes: usize,
},
SchemaIdHasSurroundingWhitespace,
SchemaIdContainsControl,
ZeroSchemaVersion,
InvalidByteLimit {
maximum: usize,
},
InvalidDepthLimit {
maximum: usize,
},
TooLarge {
kind: DurableStateKind,
max_bytes: usize,
},
TooDeep {
kind: DurableStateKind,
max_depth: usize,
},
Malformed {
kind: DurableStateKind,
},
FormatMismatch {
kind: DurableStateKind,
},
UnsupportedFormatVersion {
kind: DurableStateKind,
version: u16,
},
SchemaMismatch {
kind: DurableStateKind,
},
NonIncreasingUpgrade {
from: StateSchemaVersion,
to: StateSchemaVersion,
},
NoUpgradePath {
kind: DurableStateKind,
found: StateSchemaVersion,
current: StateSchemaVersion,
},
AmbiguousUpgrade {
kind: DurableStateKind,
from: StateSchemaVersion,
},
UpgradeOvershootsCurrent {
kind: DurableStateKind,
to: StateSchemaVersion,
current: StateSchemaVersion,
},
UpgradeChainTooLong {
kind: DurableStateKind,
max_upgrades: usize,
},
UpgradeProducedInvalidJson {
kind: DurableStateKind,
},
UnsupportedSchemaVersion {
kind: DurableStateKind,
found: StateSchemaVersion,
current: StateSchemaVersion,
},
InvalidPayload,
PayloadNotObject,
Codec(StateCodecError),
}Expand description
Stable, value-redacted durable-state validation failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptySchemaId
A schema identifier was empty.
SchemaIdTooLong
A schema identifier exceeded its UTF-8 byte limit.
SchemaIdHasSurroundingWhitespace
A schema identifier had surrounding whitespace.
SchemaIdContainsControl
A schema identifier contained a control character.
ZeroSchemaVersion
A schema version was zero.
InvalidByteLimit
A configured byte limit was zero or above the durable hard ceiling.
InvalidDepthLimit
A configured depth limit was zero or above the durable hard ceiling.
TooLarge
A serialized value exceeded its configured byte limit.
TooDeep
A serialized value exceeded its configured JSON depth.
Malformed
The bytes were not a valid framework envelope.
Fields
kind: DurableStateKindDurable state category.
FormatMismatch
The envelope belongs to the other durable-state category.
Fields
kind: DurableStateKindExpected durable state category.
UnsupportedFormatVersion
The framework envelope format version is unsupported.
SchemaMismatch
The envelope schema does not match the selected codec.
Fields
kind: DurableStateKindDurable state category.
NonIncreasingUpgrade
A declared upgrade did not strictly increase the schema version.
Fields
from: StateSchemaVersionVersion the rejected edge reads.
to: StateSchemaVersionVersion the rejected edge claims to produce.
NoUpgradePath
The codec declares no directed upgrade reaching its current version.
Fields
kind: DurableStateKindDurable state category.
found: StateSchemaVersionVersion the chain stalled at.
current: StateSchemaVersionCurrent version supported by the selected codec.
AmbiguousUpgrade
Two declared upgrades leave the same version, so the chain is not deterministic.
Fields
kind: DurableStateKindDurable state category.
from: StateSchemaVersionVersion left by more than one declared upgrade.
UpgradeOvershootsCurrent
A declared upgrade produces a version past the codec’s current version.
Fields
kind: DurableStateKindDurable state category.
to: StateSchemaVersionVersion the rejected edge produces.
current: StateSchemaVersionCurrent version supported by the selected codec.
UpgradeChainTooLong
The resolved upgrade chain exceeded its bound.
Fields
kind: DurableStateKindDurable state category.
UpgradeProducedInvalidJson
A declared upgrade returned bytes that are not valid JSON.
Fields
kind: DurableStateKindDurable state category.
UnsupportedSchemaVersion
Durable data was produced by a newer application schema.
Fields
kind: DurableStateKindDurable state category.
found: StateSchemaVersionVersion observed in durable data.
current: StateSchemaVersionCurrent version supported by the selected codec.
InvalidPayload
The application payload was not valid JSON.
PayloadNotObject
The application payload was valid JSON but not an object.
Codec(StateCodecError)
The application codec rejected the payload without exposing its value.
Trait Implementations§
Source§impl Clone for StateError
impl Clone for StateError
Source§fn clone(&self) -> StateError
fn clone(&self) -> StateError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StateError
impl Debug for StateError
Source§impl Display for StateError
impl Display for StateError
impl Eq for StateError
Source§impl Error for StateError
impl Error for StateError
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()