more doc fixes

This commit is contained in:
Toby Lawrence 2020-10-28 22:51:27 -04:00
parent 4b9b1b8bfe
commit 9560d26990
5 changed files with 7 additions and 19 deletions

View File

@ -1,15 +0,0 @@
trigger: ["master"]
pr: ["master"]
jobs:
# Check the crate formatting.
- template: ci/azure-rustfmt.yml
# Actaully test the crate.
- template: ci/azure-test-stable.yml
# Test it to make sure it still works on our minimum version.
- template: ci/azure-test-minimum.yaml
# Now test it against nightly w/ ASM support.
- template: ci/azure-test-nightly.yml

View File

@ -1,5 +1,6 @@
//! Records metrics in the Prometheus exposition format.
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))]
use std::future::Future;
use hyper::{

View File

@ -44,6 +44,8 @@
//! ```
//!
//! [metrics]: https://docs.rs/metrics
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))]
use std::collections::{BTreeMap, HashMap, VecDeque};
use std::io::{self, Write};
use std::net::SocketAddr;

View File

@ -52,8 +52,8 @@
//! the following labels:
//! - `service=login_service`
//! - `user=ferris`
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))]
use metrics::{Key, KeyData, Label, Recorder, Unit};
use metrics_util::layers::Layer;
@ -65,7 +65,7 @@ mod tracing_integration;
pub use label_filter::LabelFilter;
pub use tracing_integration::{Labels, MetricsLayer, SpanExt};
/// [`TracingContextLayer`] provides an implementation of a [`metrics::Layer`]
/// [`TracingContextLayer`] provides an implementation of a [`Layer`][metrics_util::layers::Layer]
/// for [`TracingContext`].
pub struct TracingContextLayer<F> {
label_filter: F,
@ -101,8 +101,7 @@ where
}
}
/// [`TracingContext`] is a [`metrics::Recorder`] that injects labels from the
/// [`tracing::Span`]s.
/// [`TracingContext`] is a [`metrics::Recorder`] that injects labels from [`tracing::Span`]s.
pub struct TracingContext<R, F> {
inner: R,
label_filter: F,

View File

@ -1,5 +1,6 @@
//! Helper types and functions used within the metrics ecosystem.
#![deny(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg), deny(broken_intra_doc_links))]
#![cfg_attr(not(feature = "std"), no_std)]
#[cfg(feature = "std")]