clockworklabs/SpacetimeDB · error
Failed to serialize procedure result
Error message
Failed to serialize procedure result
What it means
Error "Failed to serialize procedure result" thrown in clockworklabs/SpacetimeDB.
Source
Thrown at crates/bindings/src/rt.rs:233
fn into_result(self) -> Result<(), Box<str>> {
Ok(self)
}
}
impl<E: fmt::Display> IntoReducerResult for Result<(), E> {
#[inline]
fn into_result(self) -> Result<(), Box<str>> {
self.map_err(|e| e.to_string().into())
}
}
#[diagnostic::on_unimplemented(
message = "The procedure return type `{Self}` does not implement `SpacetimeType`",
note = "if you own the type, try adding `#[derive(SpacetimeType)]` to its definition"
)]
pub trait IntoProcedureResult: SpacetimeType + Serialize {
#[inline]
fn to_result(&self) -> ProcedureResult {
bsatn::to_vec(&self).expect("Failed to serialize procedure result")
}
}
impl<T: SpacetimeType + Serialize> IntoProcedureResult for T {}
#[diagnostic::on_unimplemented(
message = "the first argument of a reducer must be `&ReducerContext`",
label = "first argument must be `&ReducerContext`"
)]
pub trait ReducerContextArg {
// a little hack used in the macro to make error messages nicer. it generates <T as ReducerContextArg>::_ITEM
#[doc(hidden)]
const _ITEM: () = ();
}
impl ReducerContextArg for &ReducerContext {}
/// A trait of types that can be an argument of a reducer.
#[diagnostic::on_unimplemented(
message = "the reducer argument `{Self}` does not implement `SpacetimeType`",View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/bindings/src/rt.rs:233 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16).
Data as JSON: /api/errors/b17523b959fc2cdb.
Report an issue: GitHub.