Jimmy Cuadra
f1927b2e5b
Replace FromStr/TryFrom impls with Deserialize using EventResult.
2019-08-22 17:38:01 -07:00
Jimmy Cuadra
e11ac61bef
Only build PRs and the master branch on CI.
2019-08-03 14:01:50 -07:00
Jimmy Cuadra
8b92689750
Run cargo-audit on CI.
2019-07-23 09:57:42 -07:00
Jimmy Cuadra
cea0421523
Reword some documentation.
2019-07-19 15:06:47 -07:00
Jimmy Cuadra
c25d76e20f
Treat deserialization failure as a validation failure.
...
If a ruma-events type fails deserialization, but the input was valid
JSON, this should be treated as a validation failure instead of a
deserialization failure. In this case, attempt to deserialize the json
into a `serde_json::Value`, and only return a deserialization error if
that fails.
2019-07-08 03:34:42 -07:00
Jimmy Cuadra
733dfa7ef3
Implement FromStr and TryFrom<&str> for content types.
2019-06-28 12:47:41 -07:00
Jimmy Cuadra
065cb770af
Remove unnecessary for loops.
2019-06-22 00:21:23 -07:00
Jimmy Cuadra
a65a618930
Run rustfmt.
2019-06-21 17:18:06 -07:00
Jimmy Cuadra
db70792f03
Alphabetize struct fields.
2019-06-21 17:14:08 -07:00
Jimmy Cuadra
3bad559980
Add serialization and deserialization tests.
2019-06-21 17:00:28 -07:00
Jimmy Cuadra
e34ea05445
Skip serializing options.
2019-06-21 16:33:53 -07:00
Jimmy Cuadra
d9039db8df
Convert from JSON using impl FromStr and impl TryFrom<&'a str> rather than an inherent from_str method.
2019-06-20 22:40:14 -07:00
Jimmy Cuadra
e13acb4d7d
Fix copy/paste error.
2019-06-20 17:08:38 -07:00
Jimmy Cuadra
553d9c05cd
Add support for events with custom types.
2019-06-20 17:05:30 -07:00
Jimmy Cuadra
44a13e6515
Add span information to token streams when possible.
2019-06-19 23:50:06 -07:00
Jimmy Cuadra
52754f617c
Import Event trait in Serialize impl so event_type can be called.
2019-06-19 23:36:16 -07:00
Jimmy Cuadra
f663c79250
Remove extra commas from generated code.
2019-06-19 23:36:01 -07:00
Jimmy Cuadra
4423275ce2
Implement RoomEvent and StateEvent when applicable.
2019-06-19 22:40:58 -07:00
Jimmy Cuadra
be0f1d0363
Add inherent impl with from_str method.
2019-06-19 21:14:49 -07:00
Jimmy Cuadra
78e25552fb
Implement Serialize and Event.
2019-06-19 16:52:54 -07:00
Jimmy Cuadra
3b65905784
Generate content types and raw module.
2019-06-19 16:08:43 -07:00
Jimmy Cuadra
a5834ea192
Combine and sort common and custom fields using a Vec<Field>.
2019-06-19 15:40:29 -07:00
Jimmy Cuadra
2f54ee3e32
Implement generation of structs.
2019-06-18 17:54:50 -07:00
Jimmy Cuadra
48d6ef7ead
Split parsing and generation into separate modules.
2019-06-18 16:59:48 -07:00
Jimmy Cuadra
65bd8e86cc
ruma-events-macros
2019-06-18 16:34:45 -07:00