Skip to content

Commit

Permalink
Un-hide get_max_udp_payload_size
Browse files Browse the repository at this point in the history
- Removes `#[doc(hidden)]`
- Adds hyperlink
- Demotes most of the doc comment to non-doc comment, as it seems more
  like an internal note than something the user needs to see.
  • Loading branch information
gretchenfrage committed Dec 20, 2024
1 parent afc7d7f commit 69dd7be
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions quinn-proto/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,14 @@ impl EndpointConfig {
Ok(self)
}

/// Get the current value of `max_udp_payload_size`
///
/// While most parameters don't need to be readable, this must be exposed to allow higher-level
/// layers, e.g. the `quinn` crate, to determine how large a receive buffer to allocate to
/// support an externally-defined `EndpointConfig`.
///
/// While `get_` accessors are typically unidiomatic in Rust, we favor concision for setters,
/// which will be used far more heavily.
#[doc(hidden)]
/// Get the current value of [`max_udp_payload_size`](Self::max_udp_payload_size)
//
// While most parameters don't need to be readable, this must be exposed to allow higher-level
// layers, e.g. the `quinn` crate, to determine how large a receive buffer to allocate to
// support an externally-defined `EndpointConfig`.
//
// While `get_` accessors are typically unidiomatic in Rust, we favor concision for setters,
// which will be used far more heavily.
pub fn get_max_udp_payload_size(&self) -> u64 {
self.max_udp_payload_size.into()
}
Expand Down

0 comments on commit 69dd7be

Please sign in to comment.