Files
Genarrative/server-rs/crates/module-jump-hop/src/errors.rs
高物 3931442249 Enforce Genarrative play-type SOP and update docs
Rewrite Genarrative play-type integration guidance across .codex and .hermes to define a platform-level SOP: default to form/image workbench, unify single-image asset slots (CreativeImageInputPanel), standardize series-material sheet->cut->transparent->OSS pipeline, and forbid copying legacy chat/agent workflows as the default. Add decision-log entry freezing the SOP and a pitfalls note warning against direct reuse of old play tools. Update CONTEXT.md and docs/README.md, add a new PRD file, and apply related small server-side changes (module-auth, spacetime-client mappers and runtime) to align back-end code with the new contracts and flows.
2026-05-20 12:12:00 +08:00

28 lines
797 B
Rust

use std::fmt::{self, Display};
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum JumpHopError {
MissingRunId,
MissingProfileId,
MissingOwnerUserId,
EmptyPath,
RunNotPlaying,
NoNextPlatform,
}
impl Display for JumpHopError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let message = match self {
Self::MissingRunId => "缺少 runId",
Self::MissingProfileId => "缺少 profileId",
Self::MissingOwnerUserId => "owner_user_id 缺失",
Self::EmptyPath => "跳一跳路径为空",
Self::RunNotPlaying => "当前运行态不是 playing",
Self::NoNextPlatform => "没有下一块平台",
};
write!(f, "{message}")
}
}
impl std::error::Error for JumpHopError {}