From: Ian Jackson Date: Sun, 14 Jun 2020 12:04:17 +0000 (+0100) Subject: wip before restart X-Git-Tag: otter-0.2.0~1589 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7f1422032104a2ef0b59b54181e9d9b7d68bd918;p=otter.git wip before restart --- diff --git a/src/global.rs b/src/global.rs index 57210a80..928568e7 100644 --- a/src/global.rs +++ b/src/global.rs @@ -1,6 +1,6 @@ strut InstanceAccess { - inst : Rc, + i : Rc, user : usize, } diff --git a/src/main.rs b/src/main.rs index 75a64602..73d04c7f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,6 +57,17 @@ impl Read for TestCounterInner { struct MainRenderContext { }; +struct GraspForm { + a : InstanceAccess, + pn : usize, + grasped : bool, +}; +#[post("/_/api/grasp")] +fn mainpage(f : GraspForm) -> impl xxx json somehow response::Responder<'static> { + let mut g = f.a.i.lock(); + let p = g.pieces. +} + #[post("/")] fn mainpage(access : InstanceAccess) -> impl response::Responder<'static> { let c = MainRenderContext { };