aboutsummaryrefslogtreecommitdiff
path: root/src/agent.rs
AgeCommit message (Collapse)Author
2020-10-01add Agent serialization testsDaniel Schadt
2020-10-01move Agent definition to a separate fileDaniel Schadt
Just like with Event, we now have Agent defined in its own submodule. The amount of code that it entailed was a lot, so it made sense to split it off, especially with the deserialization being another big chunk of Agent related code in lib.rs The main issue was that the processing submodule accessed private fields of the Agent struct, which is now no longer possible (since processing is no longer a submodule of the module in which Agent is defined). Therefore, some simple crate-public setters for those fields have been added. Those setters are not public because we do not want outside crates to mess with the innards of Agent (yet). Although with (de)serialization being a thing, we need to ensure that we can handle nonsensical values anyway, since we can no longer guarantee that we have full control over all of the values, even without setters.