Skip to main content

ActionError

Enum ActionError 

Source
#[non_exhaustive]
pub enum ActionError { AuthorizationFailed(&'static str), IdempotencyConflict([u8; 16]), CapabilityDenied(&'static str), SchemaMismatch { expected: u16, got: u16, }, CrossShellActivity, GdprPolicyViolation, IdExhaustion, InvalidInput(&'static str), UserErasurePending { user: UserId, scheduled_tick: Tick, }, EntityShellIdReassign { entity: EntityId, old_shell: ShellId, new_shell: ShellId, }, ActorHandleCollision { shell_id: ShellId, handle: BoundedString<32>, }, }
Expand description

Taxonomy of compute-time rejections. ActionCompute::compute returns Result<(), ActionError>; the pipeline converts these to rejection records while preserving deterministic bytes (no panicking paths).

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.
§

AuthorizationFailed(&'static str)

Authorization gate rejected the caller (L2 capability missing or principal unsuitable for the Action).

§

IdempotencyConflict([u8; 16])

Idempotency-key collision — the key hit a prior record.

§

CapabilityDenied(&'static str)

A capability bit was absent from the caller’s mask.

§

SchemaMismatch

Schema-version mismatch (wire version does not match a runtime decoder).

Fields

§expected: u16

Expected schema version.

§got: u16

Observed schema version.

§

CrossShellActivity

Replay / admin path detected a cross-shell activity (E-act-2 RA).

§

GdprPolicyViolation

User has ErasurePending GDPR status; actor-originated Actions are blocked until the cascade completes (C3 contract).

§

IdExhaustion

derive_entity_id exhausted its retry bound.

§

InvalidInput(&'static str)

Action input failed a compute-path validator (KDF params, depth cap, etc.).

§

UserErasurePending

E-user-3 C3 — actor’s backing user is in GdprStatus::ErasurePending, so any actor-originated Action is blocked until the cascade finalises.

Fields

§user: UserId

Backing user whose erasure is in flight.

§scheduled_tick: Tick

Tick at which the cascade was scheduled.

§

EntityShellIdReassign

E-act-7 — an Action attempted to overwrite an entity’s existing EntityShellId with a different shell. The runtime refuses the reassignment to defend against type-erased-id brand bypass (spec E-act-2 Extension MC).

Fields

§entity: EntityId

Target entity.

§old_shell: ShellId

Currently bound shell.

§new_shell: ShellId

Attempted new shell.

§

ActorHandleCollision

E-actor-3 — (shell_id, handle) is already held by another Actor. Spawning or renaming with a colliding handle is rejected (spec E-actor-3 invariant).

Fields

§shell_id: ShellId

Shell scope of the collision.

§handle: BoundedString<32>

Offending handle.

Trait Implementations§

Source§

impl Debug for ActionError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ActionError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ActionError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.