Document defaults for all the config lists
And add an imprecation in define_list_config_builder's doc comment do do so in future for other invocations of the macro. Add add the missing full stops.
This commit is contained in:
parent
bb81a412ea
commit
ce877e4421
|
@ -66,7 +66,9 @@ impl LoggingConfig {
|
|||
type LogfileListConfig = Vec<LogfileConfig>;
|
||||
|
||||
define_list_config_builder! {
|
||||
/// List of logfiles to use, being built as part of the configuration
|
||||
/// List of logfiles to use, being built as part of the configuration.
|
||||
///
|
||||
/// The default is not to log to any files.
|
||||
pub struct LogfileListConfigBuilder {
|
||||
files: [LogfileConfigBuilder],
|
||||
}
|
||||
|
|
|
@ -186,7 +186,9 @@ fn default_preemptive_threshold() -> usize {
|
|||
type PredictedPortsList = Vec<u16>;
|
||||
|
||||
define_list_config_builder! {
|
||||
/// List of preemptive ports, being built as part of the configuration
|
||||
/// List of preemptive ports, being built as part of the configuration.
|
||||
///
|
||||
/// The default is `[80, 443]`.
|
||||
pub struct PredictedPortsListBuilder {
|
||||
pub(crate) ports: [u16],
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
///
|
||||
/// `#[derive(Default, Clone, Deserialize)]` will be applied, but you can specify other attributes
|
||||
/// too. You should supply a doc comment for the builder struct, as shown in the example.
|
||||
/// The doc comment should state the default value.
|
||||
///
|
||||
/// The `built` clause specifies the type of the built value, and how to construct it.
|
||||
/// In the expression part, `things` (the field name) will be the resolved `Vec<Thing>`
|
||||
|
|
|
@ -45,7 +45,10 @@ impl Authority {
|
|||
pub(crate) type AuthorityList = Vec<Authority>;
|
||||
|
||||
define_list_config_builder! {
|
||||
/// List of authorities, being built as part of the configuration
|
||||
/// List of authorities, being built as part of the configuration.
|
||||
///
|
||||
/// The default is to use a set of compiled-in authorities,
|
||||
/// whose identities and public keys are shipped as part of the Arti source code.
|
||||
pub struct AuthorityListBuilder {
|
||||
authorities: [AuthorityBuilder],
|
||||
}
|
||||
|
|
|
@ -31,11 +31,14 @@ impl<T: IntoIterator<Item = FallbackDir>> From<T> for FallbackList {
|
|||
}
|
||||
|
||||
define_list_config_builder! {
|
||||
/// List of fallback directories, being built as part of the configuration
|
||||
/// List of fallback directories, being built as part of the configuration.
|
||||
///
|
||||
/// Fallback directories (represented by [`FallbackDir`]) are used by Tor
|
||||
/// clients when they don't already have enough other directory information to
|
||||
/// contact the network.
|
||||
///
|
||||
/// The default is to use a set of compiled-in fallback directories,
|
||||
/// whose addresses and public keys are shipped as part of the Arti source code.
|
||||
pub struct FallbackListBuilder {
|
||||
pub(crate) fallbacks: [FallbackDirBuilder],
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue