143 Commits

Author SHA1 Message Date
Jonas Platte
35eb0bcfbf
Re-export MessageEvent from the crate root 2020-06-07 01:18:41 +02:00
Ragotzy.devin
33ac5267a9
Implement MessageEvent and AnyMessageEventContent 2020-06-07 01:18:34 +02:00
Jonas Platte
5091b9a9a8
Integrate generic event types and EventContent trait with TryFromRaw 2020-06-07 01:11:15 +02:00
Jonas Platte
cc3d0af40c
Make state a private module 2020-06-07 01:10:55 +02:00
Jonas Platte
27a9b36499
Delete collections module 2020-06-07 01:02:49 +02:00
Jonas Platte
5dc1405d9d
Add MessageEventContent trait, update docs 2020-06-07 01:02:49 +02:00
Ragotzy.devin
f0c94958fa
Move raw mod into FromRaw derive 2020-06-07 01:02:49 +02:00
Ragotzy.devin
1a9b0f3e8b
Add StateEvent<C> and AnyStateEvent 2020-06-07 01:02:49 +02:00
Ragotzy.devin
3d01bfa96d
Remove Event, RoomEvent and StateEvent traits 2020-06-07 01:02:49 +02:00
Jonas Platte
ca5c65ef10
Revise trait implementations 2020-05-02 14:15:13 +02:00
Jonas Platte
0d305d8f24
Update ruma_serde to 0.1.2 2020-04-30 18:07:20 +02:00
Jonas Platte
d837384e58
Make UnsignedData's fields public 2020-04-28 00:30:18 +02:00
Jonas Platte
f783ea6167
Fix unsigned field deserialization 2020-04-28 00:30:05 +02:00
Jonas Platte
55340d18c8
Add struct UnsignedData and update unsigned fields to use it 2020-04-28 00:03:48 +02:00
Jonas Platte
66cecdac6b
Move error types into a dedicated error module 2020-04-27 22:57:59 +02:00
Jonas Platte
6c806052f5
Move custom events, Empty struct into their own modules 2020-04-27 20:45:58 +02:00
Jonas Platte
eb3a3e2163
Replace EventResult with EventJson, simplify InvalidEvent 2020-04-22 21:24:39 +02:00
Jonas Platte
03b7d7e190
Update std::fmt import 2020-04-22 01:44:51 +02:00
Jonas Platte
d30e035d41
Change some lint attributes from deny to warn 2020-04-22 01:20:47 +02:00
Jonas Platte
2480bb292a
Replace HashMap with BTreeMap 2020-04-19 17:46:36 +02:00
Jonas Platte
013decf401
Update formatting of lib.rs 2020-04-19 00:23:07 +02:00
Jonas Platte
dc0a9f88ba
Change timestamp types from UInt to SystemTime 2020-04-17 22:43:30 +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
Ragotzy.devin
14df832005
Remove special handling of custom events 2020-03-24 11:31:47 +01:00
Jonas Platte
5a79b766c7
Revert "Remove special handling of custom events"
This reverts commit 539dd5f31dff172b5d6559378e33982d0a0c3333.
2020-03-24 11:31:36 +01:00
Ragotzy.devin
539dd5f31d
Remove special handling of custom events
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2020-03-24 11:27:55 +01:00
Jonas Platte
0c6dd0ba32
Simplify proc_macro tests
… by moving them from ruma-events-macros to ruma-events and updating the
macros to work in different contexts (without items like FromRaw being
available at the calling crate's root)
2020-03-17 13:10:40 +01:00
Jonas Platte
016659a99c
Split impl FromRaw generation into its own macro 2020-03-16 23:27:32 +01:00
Jonas Platte
0efe82bf88
Move FromRaw, TryFromRaw into a new module 2020-03-16 22:48:21 +01:00
poljar
12d725113b
Implement a collection for to-device events
To-device events are received in a sync response in a separate field of
the response.

They are sent between dirrectly without involving a room and are not
permanently stored on the serever. They are mostly used to set up
encryption between devices.

This patch implements a enum which encapsulates many of the messages
that will appear in the to-device part of a sync response.
2020-03-11 13:01:37 +01:00
Donough Liu
b03eb0261f
Add more tests for Algorithm and EventType 2020-03-10 22:36:40 +01:00
Donough Liu
0ff395fe85 Move EventType and Algorithm outside 2020-03-10 05:52:28 +08:00
Jonas Platte
1a3f6ed0b6
Derive Serialize, Deserialize impls for some enums 2019-12-15 20:26:06 +01:00
Jonas Platte
98f85df276
Remove unnecessary explicit lifetimes 2019-12-15 20:23:57 +01:00
Jonas Platte
cf5fccaccc
Simplify TryFromRaw::try_from_raw 2019-11-24 17:40:13 +01:00
Jonas Platte
b9f5fd796e
Bump MSRV to 1.36.0 2019-11-24 15:43:13 +01:00
Jonas Platte
de80253e78
Add #![warn(rust_2018_idioms)], fix warnings 2019-11-12 01:23:01 +01:00
Jonas Platte
5a0a269cfe Remove #![deny(warnings)] 2019-10-31 22:05:33 +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
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
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
Florian Jacob
c21ecd9b6d Add more documentation to vec_as_map_of_empty 2019-10-22 23:44:18 +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
7f771bc788 Fix failing tests 2019-10-18 00:46:35 +02:00