Skip to content

Commit 61dea96

Browse files
fix(cloudevents): fix builds for cloudevents features in docs (#20)
* fix(cloudevents): fix builds for cloudevents features in docs Signed-off-by: Raphael Höser <[email protected]> * chore(ci): add cargo doc to QA Signed-off-by: Raphael Höser <[email protected]> --------- Signed-off-by: Raphael Höser <[email protected]> Co-authored-by: Kuro <[email protected]>
1 parent a1d35d2 commit 61dea96

File tree

6 files changed

+12
-1
lines changed

6 files changed

+12
-1
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ qa: analyze test
33
analyze:
44
@cargo clippy
55
@cargo fmt --check
6+
@cargo doc --all-features --no-deps --document-private-items
67

78
test:
89
@cargo test

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ pub use event_types::management_event::ManagementEvent;
1111
pub use trace_info::TraceInfo;
1212

1313
#[cfg(feature = "cloudevents")]
14-
use crate::error::EventError;
14+
pub use crate::error::EventError;

src/event/event_types/event.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ use serde::{Deserialize, Serialize};
33
use serde_json::Value;
44

55
use crate::event::{EventCandidate, trace_info::TraceInfo};
6+
#[cfg(feature = "cloudevents")]
7+
use cloudevents::EventBuilder;
68

79
/// Represents an event that has been received from the DB.
810
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]

src/event/event_types/event_candidate.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use typed_builder::TypedBuilder;
55

66
#[cfg(feature = "cloudevents")]
77
use crate::error::EventError;
8+
#[cfg(feature = "cloudevents")]
9+
use cloudevents::AttributesReader;
810

911
/// Represents an event candidate that can be sent to the DB.
1012
/// This is a simplified version of the [`super::event::Event`] type.

src/event/event_types/management_event.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ use chrono::{DateTime, Utc};
22
use serde::{Deserialize, Serialize};
33
use serde_json::Value;
44

5+
#[cfg(feature = "cloudevents")]
6+
use cloudevents::EventBuilder;
7+
58
/// Represents a management event that has been received from the DB.
69
///
710
/// For management requests like [`crate::client::Client::ping`] and [`crate::client::Client::verify_api_token`] the DB will send a management event.

src/event/trace_info.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
33
use serde::{Deserialize, Serialize};
44

5+
#[cfg(feature = "cloudevents")]
6+
use crate::error::EventError;
7+
58
/// Represents the trace information of an event.
69
/// This is used for distributed tracing.
710
/// It can either be a traceparent or a traceparent and tracestate.

0 commit comments

Comments
 (0)