diff --git a/tokio-trace/tokio-trace-core/src/span.rs b/tokio-trace/tokio-trace-core/src/span.rs index 1ad66a554..7b93d8d69 100644 --- a/tokio-trace/tokio-trace-core/src/span.rs +++ b/tokio-trace/tokio-trace-core/src/span.rs @@ -2,7 +2,7 @@ /// Identifies a span within the context of a process. /// -/// Span IDs are used primarily to determine of two handles refer to the same +/// Span IDs are used primarily to determine if two handles refer to the same /// span, without requiring the comparison of the span's fields. /// /// They are generated by [`Subscriber`](::Subscriber)s for each span as it is @@ -19,4 +19,9 @@ impl Span { pub fn from_u64(u: u64) -> Self { Span(u) } + + /// Returns the span's ID as a `u64`. + pub fn into_u64(&self) -> u64 { + self.0 + } }