chiark / gitweb /
wip before restart
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Jun 2020 12:04:17 +0000 (13:04 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Jun 2020 12:04:17 +0000 (13:04 +0100)
src/global.rs
src/main.rs

index 57210a80e8e4da780e75304ea92649981fd48a11..928568e70699fab2553cbcc7522f7fc72e9b46d5 100644 (file)
@@ -1,6 +1,6 @@
 
 strut InstanceAccess {
-  inst : Rc<Instance>,
+  i : Rc<Instance>,
   user : usize,
 }
 
index 75a646025968fc2859fca8a8db123ee420dece47..73d04c7f673f868ee3239c32933223486ec29c73 100644 (file)
@@ -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("/<access>")]
 fn mainpage(access : InstanceAccess) -> impl response::Responder<'static> {
   let c = MainRenderContext { };