jamiebrynes7 / spatialos-sdk-rs

Rust integration of the SpatialOS C API bindings
Apache License 2.0
21 stars 6 forks source link

Command traits #166

Closed jamiebrynes7 closed 4 years ago

jamiebrynes7 commented 4 years ago

Following on from @randomPoison's ideas in #121 and examples in various previous PRs, this PR splits out the CommandResponse and CommandRequest traits from the Component trait.

It also restructures the traits somewhat such that there is a Commands trait which is only implemented if there any commands associated with that component. This cuts down on unnecessary generated code and models the domain (schema) a bit more accurately.

There are a number of associated changes in this PR:

codecov[bot] commented 4 years ago

Codecov Report

Merging #166 into master will increase coverage by 0.88%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   20.10%   20.99%   +0.88%     
==========================================
  Files          41       41              
  Lines        4188     3997     -191     
==========================================
- Hits          842      839       -3     
+ Misses       3346     3158     -188     
Impacted Files Coverage Δ
project-example/src/generated.rs 0.00% <0.00%> (ø)
project-example/src/main.rs 0.00% <0.00%> (ø)
spatialos-sdk/src/worker/commands.rs 12.76% <0.00%> (-15.81%) :arrow_down:
spatialos-sdk/src/worker/component.rs 13.04% <ø> (+3.95%) :arrow_up:
spatialos-sdk/src/worker/connection.rs 0.00% <0.00%> (ø)
spatialos-sdk/src/worker/op.rs 6.22% <0.00%> (+0.10%) :arrow_up:
spatialos-sdk/src/worker/schema.rs 3.59% <ø> (ø)
spatialos-sdk/src/worker/schema/object.rs 44.68% <0.00%> (-0.98%) :arrow_down:
spatialos-sdk/src/worker/schema/bundle.rs 86.31% <0.00%> (-0.77%) :arrow_down:
spatialos-sdk/src/worker/snapshot.rs 79.06% <0.00%> (-0.48%) :arrow_down:
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 98ca71e...ef6edf4. Read the comment docs.

jamiebrynes7 commented 4 years ago

Sorry for taking so long to get to this, btw!

Oh no, don't worry about it 😄