From 7f1422032104a2ef0b59b54181e9d9b7d68bd918 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 14 Jun 2020 13:04:17 +0100 Subject: [PATCH] wip before restart --- src/global.rs | 2 +- src/main.rs | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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 { }; -- 2.30.2