mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-09 00:00:08 +02:00
trace: Add arguments struct to subscriber::Record (#955)
This branch changes the `Subscriber::record` method to take a new arguments struct, `span::Record`. The `field::Record` trait was renamed to `field::Visit` to prevent name conflicts. In addition, the `ValueSet::is_empty`, `ValueSet::contains`, and `ValueSet::record` methods were made crate-private, as they are exposed on the `Attributes` and `Record` types. Signed-off-by: Eliza Weisman <[email protected]>
This commit is contained in:
@@ -247,10 +247,10 @@
|
||||
//! #[macro_use]
|
||||
//! extern crate tokio_trace;
|
||||
//! # pub struct FooSubscriber;
|
||||
//! # use tokio_trace::{span::{Id, Attributes}, Metadata, field::ValueSet};
|
||||
//! # use tokio_trace::{span::{Id, Attributes, Record}, Metadata};
|
||||
//! # impl tokio_trace::Subscriber for FooSubscriber {
|
||||
//! # fn new_span(&self, _: &Attributes) -> Id { Id::from_u64(0) }
|
||||
//! # fn record(&self, _: &Id, _: &ValueSet) {}
|
||||
//! # fn record(&self, _: &Id, _: &Record) {}
|
||||
//! # fn event(&self, _: &tokio_trace::Event) {}
|
||||
//! # fn record_follows_from(&self, _: &Id, _: &Id) {}
|
||||
//! # fn enabled(&self, _: &Metadata) -> bool { false }
|
||||
|
||||
Reference in New Issue
Block a user