251 Commits

Author SHA1 Message Date
Jonas Platte
63e32f2b01 Exhausively match EventType in collection deserilization code 2019-10-27 21:26:03 +01:00
Jonas Platte
3b78391fbc Implement custom event deserialization 2019-10-27 21:01:28 +01:00
Jonas Platte
cbe22a84eb Remove commented-out code 2019-10-27 20:56:32 +01:00
Jonas Platte
ce6937c1a0 Update docs 2019-10-24 22:55:10 +02:00
Jonas Platte
1af436b775 Simplify InvalidEvent, update its documentation 2019-10-24 22:26:20 +02:00
Jonas Platte
2dd9ddd4e8 Allow clippy warning use_self 2019-10-23 02:53:00 +02:00
Jonas Platte
09378eb410 Refactor collection deserialization 2019-10-23 02:24:07 +02:00
Jonas Platte
60c817e1b0 Restore Rust 1.34.2 compatibility 2019-10-23 02:09:34 +02:00
Jonas Platte
c925cd13f1 Update documentation 2019-10-23 01:42:06 +02:00
Jonas Platte
63a012d338 Remove useless .to_owned() 2019-10-23 01:41:37 +02:00
Jonas Platte
922a35eced Refactor InvalidEvent 2019-10-23 01:41:09 +02:00
Jonas Platte
665fe4f4f4 Move (de)serialization helpers to util module 2019-10-22 23:56:03 +02:00
Jonas Platte
777f3b9686 Re-run rustfmt 2019-10-22 23:52:44 +02:00
Florian Jacob
c21ecd9b6d Add more documentation to vec_as_map_of_empty 2019-10-22 23:44:18 +02:00
Jonas Platte
7e5ca6e7af Simplify StrippedStateContent deserialization 2019-10-21 14:20:53 +02:00
Jonas Platte
7e210476fa Re-enable #![deny(...)] attributes 2019-10-19 02:31:54 +02:00
Jonas Platte
9536099f38 Replace custom Void type, change TryFromRaw::Err bound 2019-10-19 02:13:21 +02:00
Jonas Platte
63b85f524c Get rid of redundant clone()s (thanks to clippy) 2019-10-18 23:48:48 +02:00
Jonas Platte
7f771bc788 Fix failing tests 2019-10-18 00:46:35 +02:00
Jonas Platte
85990676cd Remove impl Serialize for EventResult 2019-10-17 00:21:52 +02:00
Jonas Platte
982d978d94 Almost finish deserialize impl's 2019-10-16 21:40:30 +02:00
Jonas Platte
5ad549b3e4 Add part of the deserialization logic for collections/raw/* 2019-10-16 00:07:06 +02:00
Jonas Platte
1aaee389ec Add missing TryFromRaw implementations 2019-10-15 23:45:45 +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
516f027aca temporarily add panicing Serialize impl for EventResult 2019-10-14 22:20:31 +02:00
Jonas Platte
9b26c60fe8 Complete EventResult API for stripped 2019-10-13 19:13:15 +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
91d564dcf8 WIP 2019-09-03 12:01:29 -07:00
Jimmy Cuadra
c309eed2ae impl Deserialize for m.room.server_acl 2019-08-06 15:23:40 -07:00
Jimmy Cuadra
db89aad22c impl Deserialize for m.room.canonical_alias 2019-08-06 15:19:55 -07:00
Jimmy Cuadra
35e5ed9491 impl Deserialize for m.room.power_levels 2019-08-06 15:15:33 -07:00
Jimmy Cuadra
2a2dcf6801 impl Deserialize for m.room.name 2019-08-06 15:07:38 -07:00
Jimmy Cuadra
bd64b7f4be impl Deserialize for m.room.message 2019-08-06 15:02:05 -07:00
Jimmy Cuadra
2acca3e3ef impl Deserialize for m.room.encrypted 2019-08-06 14:54:25 -07:00
Jimmy Cuadra
c69e1c6204 impl Deserialize for m.ignored_user_list 2019-08-06 14:45:18 -07:00
Jimmy Cuadra
685a61954c Ensure validation logic for m.key.verification.start is run when deserializing the event, not just the content. 2019-08-06 01:25:29 -07:00
Jimmy Cuadra
4984868e21 EventResult::into --> EventResult::into_result 2019-08-05 16:32:14 -07:00
Jimmy Cuadra
30c1ef07dc impl Deserialize m.key.verification.start 2019-08-05 15:55:25 -07:00
Jimmy Cuadra
04cc113473 Add EventResult type for fallible deserialization. 2019-08-05 15:54:59 -07:00
Jimmy Cuadra
38492dd09e Split presence serialization/deserialization tests into two test cases. 2019-07-23 01:31:03 -07:00
Jimmy Cuadra
9bc2de3200 Mention that supporting types for event impl Deserialize. 2019-07-23 01:25:49 -07:00
Jimmy Cuadra
dbadf52da8 Add tests for m.room.create. 2019-07-23 01:25:43 -07:00
Jimmy Cuadra
9dbf00b12d Event traits --> Event kinds 2019-07-23 01:03:09 -07:00
Jimmy Cuadra
41ef94a617 Mention that TryFrom can be used just as FromStr. 2019-07-23 01:02:34 -07:00
Jimmy Cuadra
abac13a7dd Bound Event by FromStr. 2019-07-23 00:44:42 -07:00
Jimmy Cuadra
b88c621214 impl Display for Action 2019-07-23 00:44:37 -07:00
Jimmy Cuadra
4c7156b187 Clarify when FromStrErr is used. 2019-07-23 00:26:35 -07:00