23 Commits

Author SHA1 Message Date
Jonas Platte
eb3a3e2163
Replace EventResult with EventJson, simplify InvalidEvent 2020-04-22 21:24:39 +02:00
Jonas Platte
2480bb292a
Replace HashMap with BTreeMap 2020-04-19 17:46:36 +02:00
Jonas Platte
dc0a9f88ba
Change timestamp types from UInt to SystemTime 2020-04-17 22:43:30 +02:00
PipsqueakH
a9e1a2b0b0
Replace all remaining manual implementations by derives 2020-04-05 19:37:04 +02:00
Akshay
8915339e56
Rewrite tests to use serde_json::json! instead of raw strings 2020-03-31 16:07:09 +02:00
Jonas Platte
cba7b161e9
Update unsigned field's type from Option<Value> to Map<String, Value>
* it's guaranteed to always be an object
* `Option` isn't needed because the distinction empty object / missing
  field is not of interest
2020-03-29 15:37:57 +02:00
Jonas Platte
665fe4f4f4 Move (de)serialization helpers to util module 2019-10-22 23:56:03 +02:00
Jonas Platte
09b8de5b6e Introduce FromRaw in addition to TryFromRaw 2019-10-15 20:26:30 +02:00
Jonas Platte
a6c34596d7 Rename EventResultCompatible to TryFromRaw 2019-10-15 20:05:46 +02:00
Jonas Platte
c20d79db7d Inline try_from method into EventResultCompatible 2019-10-08 21:28:18 +02:00
Jonas Platte
05562a48a3 WIP 2019-09-29 13:30:51 +02:00
Jonas Platte
297bae4cbb Remove FromStr, TryFrom<&'_ str> implementations 2019-09-29 10:56:15 +02:00
Jimmy Cuadra
c309eed2ae impl Deserialize for m.room.server_acl 2019-08-06 15:23:40 -07:00
Jimmy Cuadra
b003699048 Remove unnecessary crate:: prefixes. 2019-07-19 14:59:45 -07:00
Jimmy Cuadra
7d1701ccce Implement FromStr for content types. 2019-07-19 14:56:38 -07:00
Jimmy Cuadra
0f55729478 Handle both deserialization and validation errors in FromStr impls. 2019-07-19 14:54:31 -07:00
Jimmy Cuadra
71646445d5 Sort fields of ServerAclEvent alphabetically. 2019-07-19 14:48:38 -07:00
Jimmy Cuadra
03099b9a8b Add InvalidInput type and convert m.room.name to the new API. 2019-07-19 14:43:24 -07:00
Jimmy Cuadra
afe44b4dda Convert m.room.server_acl to the new API. 2019-07-19 14:42:57 -07:00
Jimmy Cuadra
c3f48c5be3 Use js_int types for numbers.
Closes #27.
2019-06-16 16:16:37 -07:00
Jimmy Cuadra
add7ef0d8b Add blank lines to make type definitions easier to read. 2019-06-14 14:02:03 -07:00
Jimmy Cuadra
7530342637 Adjust some default values. 2019-06-13 16:59:22 -07:00
Jimmy Cuadra
9836222b73 Add m.room.server_acl. 2019-06-13 01:24:00 -07:00