• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

slide-rs / specs / 748
10%

Build:
DEFAULT BRANCH: master
Ran 04 Oct 2017 05:11PM UTC
Jobs 1
Files 12
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
748

push

travis-ci

bors[bot]
Merge #275

275: Add an ability to save and load entities. r=torkleyy a=omni-viral

Add (de)serialization support for entities to specs.
Main parts are:
* `Marker` trait.
`Marker` is used for several purposes:
  * Mark which entities should be serialized.
  * It contains ID to replace `Entity` stored in `Component`s during serialization process.
  * It may contain additional data to be used for tracking owner of the component.
* `MarkerAllocator` trait for allocating `Marker`s, storing `Marker -> Entity` mapping and other stuff.
* `SerializableComponent` trait that is auto implemented by components if they implements `Serialize`, `DeserializeOwned` and `Copy` (later is rather strict, maybe it should be replaced with `Clone` or removed somehow).
Mainly `Component` implements `SerializableComponent` manually when it contains `Entity`.
`Component` should replace `Entity` with provided `Marker` in `SerializableComponent::save` function. And replace `Marker` with `Entity` in `SerializableComponent::load` function.
* `Components` trait is implemented for tuples of `SerializableComponent`s
It allows to save all existing and mentioned in tuple components of one entity from `ReadStorage`s into serializable structure. And load it into `WriteStorage`s again.

Helper types `WorldSerialize` and `WorldDeserialize` are good example how to use this facility.

1022 of 1136 relevant lines covered (89.96%)

0.9 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
3
100.0
error.rs
Jobs
ID Job ID Ran Files Coverage
2 748.2 04 Oct 2017 05:11PM UTC 0
89.96
Travis Job 748.2
Source Files on build 748
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #748
  • 5e2a2c2a on github
  • Prev Build on master (#740)
  • Next Build on master (#750)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc