File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 5
5
//! Since this library is used in the Sentry relay as well it depends on
6
6
//! `serde_json` with the `preserve_order` feature. As such all maps used
7
7
//! by the protocol are linked hash maps.
8
+ //!
9
+ //! Most of the types in this crate are serializable in one form or another.
10
+ //! The types in the `protocol` module are generally really only serializable
11
+ //! to JSON as other formats are not supported by Sentry at this date.
12
+ //!
13
+ //! ## Contents
14
+ //!
15
+ //! The crate provides a bunch of common types for working with Sentry as
16
+ //! such (DSN, ProjectIDs, authentication headers) as well as types for
17
+ //! the Sentry event protocol.
18
+ //!
19
+ //! Right now only `v7` of the protocol is implemented but it's versioned
20
+ //! so later versions might be added later.
21
+ //!
22
+ //! ## API Concepts
23
+ //!
24
+ //! Most types are directly serializable or deserializable and try to implement
25
+ //! the `Default` type. This means that objects can be created conviently
26
+ //! and missing attributes can be filled in:
27
+ //!
28
+ //! ```rust
29
+ //! use sentry_types::protocol::v7;
30
+ //!
31
+ //! let event = v7::Event {
32
+ //! message: Some("Hello World!".to_string()),
33
+ //! culprit: Some("foo in bar".to_string()),
34
+ //! level: v7::Level::Info,
35
+ //! ..Default::default()
36
+ //! };
37
+ //! ```
8
38
#![ warn( missing_docs) ]
9
39
extern crate chrono;
10
40
extern crate failure;
You can’t perform that action at this time.
0 commit comments