Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

head down to the pub #1

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions tracing-serde/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,39 +331,39 @@ pub enum SerializeLevel {

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct SerializeId {
id: NonZeroU64,
pub id: NonZeroU64,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct SerializeMetadata<'a> {
#[serde(borrow)]
name: CowString<'a>,
target: CowString<'a>,
level: SerializeLevel,
module_path: Option<CowString<'a>>,
file: Option<CowString<'a>>,
line: Option<u32>,
fields: SerializeFieldSet<'a>,
is_span: bool,
is_event: bool,
pub name: CowString<'a>,
pub target: CowString<'a>,
pub level: SerializeLevel,
pub module_path: Option<CowString<'a>>,
pub file: Option<CowString<'a>>,
pub line: Option<u32>,
pub fields: SerializeFieldSet<'a>,
pub is_span: bool,
pub is_event: bool,
}

/// Implements `serde::Serialize` to write `Event` data to a serializer.
#[derive(Debug, Serialize, Deserialize)]
pub struct SerializeEvent<'a> {
#[serde(borrow)]
fields: SerializeRecordFields<'a>,
metadata: SerializeMetadata<'a>,
parent: Option<SerializeId>,
pub fields: SerializeRecordFields<'a>,
pub metadata: SerializeMetadata<'a>,
pub parent: Option<SerializeId>,
}

/// Implements `serde::Serialize` to write `Attributes` data to a serializer.
#[derive(Debug, Serialize, Deserialize)]
pub struct SerializeAttributes<'a> {
#[serde(borrow)]
metadata: SerializeMetadata<'a>,
parent: Option<SerializeId>,
is_root: bool,
pub metadata: SerializeMetadata<'a>,
pub parent: Option<SerializeId>,
pub is_root: bool,
}

type RecordMap<'a> = TracingMap<CowString<'a>, SerializeValue<'a>>;
Expand Down