pub use super::*;
-type WRC = WhatResponseToClientOp;
-
type PL = PresentationLayout;
#[derive(Clone,Debug)]
use MgmtCommand::*;
use MgmtResponse::*;
-type ME = MgmtError;
-
-type AS = AccountScope;
type TP = TablePermission;
const USERLIST: &str = "/etc/userlist";
Unix { user: String },
}
-type AS = AccountScope;
-type ME = MgmtError;
-type IE = InternalError;
#[derive(Debug,Clone)]
#[derive(Eq,PartialEq,Ord,PartialOrd,Hash)]
use otter::imports::*;
type APE = ArgumentParseError;
-type AS = AccountScope;
type E = anyhow::Error;
type MC = MgmtCommand;
-type ME = MgmtError;
type MGI = MgmtGameInstruction;
type MGR = MgmtGameResponse;
type MR = MgmtResponse;
use crate::imports::*;
-type IE = InternalError;
-
#[derive(Error,Debug)]
pub enum OnlineError {
#[error("Game in process of being destroyed")]
use crate::imports::*;
-type IE = InternalError;
-type IR = Result<(), IE>;
type SE = SVGProcessingError;
// ---------- newtypes and type aliases ----------
}
// #[throws] doesn't work here - fehler #todo
- fn svg_piece(&self, f: &mut Html, pri: &PieceRenderInstructions) -> IR;
+ fn svg_piece(&self, f: &mut Html, pri: &PieceRenderInstructions)
+ -> Result<(),IE>;
fn describe_html(&self, face: Option<FaceId>) -> Html;
use slotmap::dense as sm;
use std::sync::PoisonError;
-type ME = MgmtError;
-type ESU<POEPU> = ErrorSignaledViaUpdate<POEPU>;
-
#[allow(non_camel_case_types)] type PUE_P = PreparedUpdateEntry_Piece;
// ---------- newtypes and type aliases ----------
}
buf.finish();
- self.remove_clients(old_players_set, ESU::PlayerRemoved);
+ self.remove_clients(old_players_set, ESVU::PlayerRemoved);
self.tokens_deregister_for_id(
|id:PlayerId| old_players_set.contains(&id)
);
// ppoint of no return
(||{
self.remove_clients(&[player].iter().cloned().collect(),
- ESU::TokenRevoked);
+ ESVU::TokenRevoked);
})(); // <- No ?, ensures that IEFE is infallible (barring panics)
}
pub enum Impossible { }
display_as_debug!(Impossible);
+// ---------- type abbreviations ----------
+
pub type AE = anyhow::Error;
+
+// accounts.rs
+pub type AS = AccountScope;
+
+// commands.rs
+pub type ME = MgmtError;
+
+// error.rs
+pub type ESVU<POEPU> = ErrorSignaledViaUpdate<POEPU>;
+pub type IE = InternalError;
pub type OE = OnlineError;
pub type POEPP = PieceOpErrorPartiallyProcessed;
// updates.rs
+pub type PUE = PreparedUpdateEntry;
pub type PUO = PieceUpdateOps;
+pub type WRC = WhatResponseToClientOp;
type ColourMap = IndexVec<FaceId, Colour>;
+type SE = SVGProcessingError;
+
#[derive(Debug,Serialize,Deserialize)]
// todo: this serialisation is rather large
struct SimpleShape {
fn from(se: SVGProcessingError) -> MgmtError { se.into() }
}
-type IE = InternalError;
-type SE = SVGProcessingError;
-
#[throws(SE)]
pub fn svg_rescale_path(input: &Html, scale: f64) -> Html {
type BM = u64;
pub use crate::imports::*;
-#[doc(hidden)] pub type IE = InternalError;
#[doc(hidden)] pub type LLE = shapelib::LibraryLoadError;
#[cfg(doc)]
pub use implementation::PlayerAccessSpec;
-type ME = crate::commands::MgmtError;
-
//---------- common types ----------
pub type Coord = i32;
use crate::imports::*;
-type PUE = PreparedUpdateEntry;
-type ESVU<POEPU> = ErrorSignaledViaUpdate<POEPU>;
-
#[allow(non_camel_case_types)] type PUE_P = PreparedUpdateEntry_Piece;
#[allow(non_camel_case_types)] type TUE_P<'u> = TransmitUpdateEntry_Piece<'u>;
ClientId,
ClientSequence
)>;
+
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub enum WhatResponseToClientOp {
/// In PROTOCOL.md terms, a Client update
// ---------- for traansmission ----------
-type WRC = WhatResponseToClientOp;
-
impl PreparedUpdate {
pub fn for_transmit<'u>(&'u self, tz: &'u Timezone,
player: PlayerId, dest: ClientId)