MessagePackDecodeFail(#[from] rmp_serde::decode::Error),
}
+#[derive(Error,Debug,Serialize,Copy,Clone)]
+pub enum ErrorSignaledViaUpdate {
+ RenderingError,
+}
+display_as_debug!{ErrorSignaledViaUpdate}
+
pub type StartupError = anyhow::Error;
pub use OnlineError::{NoClient,NoPlayer};
op : PieceUpdateOp<PreparedPieceState>,
},
Log (Arc<LogEntry>),
- RenderingError,
+ Error (ErrorSignaledViaUpdate),
}
#[derive(Debug,Serialize)]
op : &'u PieceUpdateOp<PreparedPieceState>,
},
Log (&'u LogEntry),
- ServerUpdateGenerationError,
+ Error(ErrorSignaledViaUpdate),
}
// ========== implementation ==========
},
Log(logent) => {
logent.html.as_bytes().len() * 3
- }
- RenderingError => {
+ },
+ Error(_) => {
100
- }
+ },
}
}
}
.unwrap_or_else(|e| {
eprintln!("piece update error! piece={:?} lens={:?} error={:?}",
piece, &lens, &e);
- PreparedUpdateEntry::RenderingError
+ PreparedUpdateEntry::Error(ErrorSignaledViaUpdate::RenderingError)
});
self.us.push(update);
}
PreparedUpdateEntry::Log(logent) => {
TransmitUpdateEntry::Log(&logent)
},
- PreparedUpdateEntry::RenderingError => {
- TransmitUpdateEntry::ServerUpdateGenerationError
+ &PreparedUpdateEntry::Error(e) => {
+ TransmitUpdateEntry::Error(e)
}
};
ents.push(ue);