struct AgentPosition {
+headless::AgentPosition - Rust
Serialize this value into the given Serde serializer. Read more
+ Fields
Serialize this value into the given Serde serializer. Read more
impl<T> Any for T where T: 'static + ?Sized ,
[src] Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/headless/struct.AgentPositions.html b/rustdoc/headless/struct.AgentPositions.html
index 37286d4069..81975f0f41 100644
--- a/rustdoc/headless/struct.AgentPositions.html
+++ b/rustdoc/headless/struct.AgentPositions.html
@@ -1,7 +1,7 @@
-
headless::AgentPositions - Rust
struct AgentPositions {
+headless::AgentPositions - Rust
Serialize this value into the given Serde serializer. Read more
+ Fields
Serialize this value into the given Serde serializer. Read more
impl<T> Any for T where T: 'static + ?Sized ,
[src] Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/headless/struct.Delays.html b/rustdoc/headless/struct.Delays.html
index 154f5d5d33..77480d0b3d 100644
--- a/rustdoc/headless/struct.Delays.html
+++ b/rustdoc/headless/struct.Delays.html
@@ -1,7 +1,7 @@
-
headless::Delays - Rust
struct Delays {
+headless::Delays - Rust
Serialize this value into the given Serde serializer. Read more
+ Fields
Serialize this value into the given Serde serializer. Read more
impl<T> Any for T where T: 'static + ?Sized ,
[src] Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/headless/struct.FinishedTrips.html b/rustdoc/headless/struct.FinishedTrips.html
index cae8cb469a..250e2f34fa 100644
--- a/rustdoc/headless/struct.FinishedTrips.html
+++ b/rustdoc/headless/struct.FinishedTrips.html
@@ -1,7 +1,7 @@
-
headless::FinishedTrips - Rust
struct FinishedTrips {
+headless::FinishedTrips - Rust
Serialize this value into the given Serde serializer. Read more
+ Fields
Serialize this value into the given Serde serializer. Read more
impl<T> Any for T where T: 'static + ?Sized ,
[src] Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/headless/struct.LoadSim.html b/rustdoc/headless/struct.LoadSim.html
index 4acc14bc0d..b84a701611 100644
--- a/rustdoc/headless/struct.LoadSim.html
+++ b/rustdoc/headless/struct.LoadSim.html
@@ -1,11 +1,11 @@
-
headless::LoadSim - Rust
struct LoadSim {
+headless::LoadSim - Rust
Deserialize this value from the given Serde deserializer. Read more
+ Fields
Deserialize this value from the given Serde deserializer. Read more
impl<T> Any for T where T: 'static + ?Sized ,
[src] Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/headless/struct.RoadThroughput.html b/rustdoc/headless/struct.RoadThroughput.html
index 619f174c46..2df3cee38b 100644
--- a/rustdoc/headless/struct.RoadThroughput.html
+++ b/rustdoc/headless/struct.RoadThroughput.html
@@ -1,7 +1,7 @@
-
headless::RoadThroughput - Rust
struct RoadThroughput {
+headless::RoadThroughput - Rust
Serialize this value into the given Serde serializer. Read more
+ Fields
Serialize this value into the given Serde serializer. Read more
impl<T> Any for T where T: 'static + ?Sized ,
[src] Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/headless/struct.Throughput.html b/rustdoc/headless/struct.Throughput.html
index 32f3f81c82..17060104f5 100644
--- a/rustdoc/headless/struct.Throughput.html
+++ b/rustdoc/headless/struct.Throughput.html
@@ -1,7 +1,7 @@
-
headless::Throughput - Rust
struct Throughput {
+headless::Throughput - Rust
Serialize this value into the given Serde serializer. Read more
+ Fields
Serialize this value into the given Serde serializer. Read more
impl<T> Any for T where T: 'static + ?Sized ,
[src] Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
diff --git a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-9f4de26f0a0787cb/out/built.rs.html b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-9f4de26f0a0787cb/out/built.rs.html
index 38fd334879..85e03245d1 100644
--- a/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-9f4de26f0a0787cb/out/built.rs.html
+++ b/rustdoc/src/game/home/runner/work/abstreet/abstreet/target/debug/build/game-9f4de26f0a0787cb/out/built.rs.html
@@ -111,7 +111,7 @@
pub const RUSTDOC_VERSION :
& str = "rustdoc 1.46.0 (04488afe3 2020-08-24)" ;
-
pub const BUILT_TIME_UTC :
& str = "Fri, 25 Sep 2020 00:27:36 +0000" ;
+
pub const BUILT_TIME_UTC :
& str = "Fri, 25 Sep 2020 00:41:22 +0000" ;
pub const CFG_TARGET_ARCH :
& str = "x86_64" ;
diff --git a/rustdoc/src/headless/main.rs.html b/rustdoc/src/headless/main.rs.html
index ec1f3320a9..38f2682cec 100644
--- a/rustdoc/src/headless/main.rs.html
+++ b/rustdoc/src/headless/main.rs.html
@@ -366,6 +366,9 @@
366
367
368
+
369
+
370
+
371
@@ -383,7 +386,7 @@
use abstutil ::{serialize_btreemap , CmdArgs , Timer };
use geom ::{Duration , LonLat , Time };
-use hyper ::{Body , Request , Response , Server };
+use hyper ::{Body , Request , Response , Server , StatusCode };
use map_model ::{
CompressedMovementID , ControlTrafficSignal , EditCmd , EditIntersection , IntersectionID , Map ,
MovementID , PermanentMapEdits , RoadID ,
@@ -456,22 +459,25 @@
.collect ();
let body = hyper ::body ::to_bytes (req ).await ? .to_vec ();
info ! ("Handling {}" , path );
- let resp = match handle_command (
- & path ,
- & params ,
- & body ,
- & mut SIM .write ().unwrap (),
- & mut MAP .write ().unwrap (),
- & mut LOAD .write ().unwrap (),
- ) {
- Ok (resp ) = > resp ,
- Err (err ) = > {
- error ! ("{}: {}" , path , err );
-
- format ! ("Bad command {} with params {:?}: {}" , path , params , err )
- }
- };
- Ok (Response ::new (Body ::from (resp )))
+ Ok (
+ match handle_command (
+ & path ,
+ & params ,
+ & body ,
+ & mut SIM .write ().unwrap (),
+ & mut MAP .write ().unwrap (),
+ & mut LOAD .write ().unwrap (),
+ ) {
+ Ok (resp ) = > Response ::new (Body ::from (resp )),
+ Err (err ) = > {
+ error ! ("{}: {}" , path , err );
+ Response ::builder ()
+ .status (StatusCode ::BAD_REQUEST )
+ .body (Body ::from (format ! ("Bad command {}: {}" , path , err )))
+ .unwrap ()
+ }
+ },
+ )
}
fn handle_command (