doc fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-02-02 14:14:09 +01:00
parent 41862eeb95
commit c609a58086
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@ impl <S> RateLimitedStream<S> {
Self::with_limiter(stream, Some(read_limiter), Some(write_limiter))
}
/// Creates a new instance with specified [RateLimiters] for reads and writes.
/// Creates a new instance with specified [`RateLimiter`s](RateLimiter) for reads and writes.
pub fn with_limiter(
stream: S,
read_limiter: Option<SharedRateLimit>,

View File

@ -16,7 +16,7 @@ pub trait RateLimit {
fn register_traffic(&mut self, current_time: Instant, data_len: u64) -> Duration;
}
/// Like [RateLimit], but does not require self to be mutable.
/// Like [`RateLimit`], but does not require self to be mutable.
///
/// This is useful for types providing internal mutability (Mutex).
pub trait ShareableRateLimit: Send + Sync {

View File

@ -22,10 +22,10 @@ pub async fn test_influxdb_udp(address: &str) -> Result<(), Error> {
Ok(())
}
/// Returns a [Metrics] handle that connects and sends data to the
/// Returns a [`Metrics`] handle that connects and sends data to the
/// given influxdb server at the given udp address/port
///
/// `address` must be in the format of 'ip_or_hostname:port'
/// `address` must be in the format of `ip_or_hostname:port`
pub fn influxdb_udp(address: &str, mtu: Option<u16>) -> Metrics {
let (tx, rx) = mpsc::channel(1024);