/// Module for use with parse2's `with`, to parse one argument of comma-separated consensus methods
#[error("missing auth certs mean we could not verify enough consensus signatures (need at least {deficit} more, out of {} that are missing)", missing.len())]
/// <https://spec.torproject.org/dir-spec/consensus-formats.html#item:shared-rand-current-value>
/// <https://spec.torproject.org/dir-spec/consensus-formats.html#authority-item-shared-rand-value>
// The item parsing multiplicity machinery would see plain `RelayBandwidthItem` as a required item.
/// An "empty" `RelayBandwidthItem` can be constructed with [`RelayBandwidthItem::new_no_info`].
// TODO DIRAUTH rework this according to the API design conclusion from !3977 when there is one
static NS_HEADER_RULES_COMMON_: LazyLock<SectionRulesBuilder<NetstatusKwd>> = LazyLock::new(|| {
static NS_VOTERINFO_RULES_CONSENSUS: LazyLock<SectionRules<NetstatusKwd>> = LazyLock::new(|| {
static NS_ROUTERSTATUS_RULES_PLAIN: LazyLock<SectionRules<NetstatusKwd>> = LazyLock::new(|| {
static NS_ROUTERSTATUS_RULES_MDCON: LazyLock<SectionRules<NetstatusKwd>> = LazyLock::new(|| {
fn from_section(sec: &Section<'_, NetstatusKwd>) -> crate::Result<ConsensusAuthorityEntry> {
fn try_from(params: &ParamValues<u32>) -> Result<RelayBandwidth, InvalidRelayBandwidth> {
fn try_from(params: ParamValues<u32>) -> Result<RelayBandwidthItem, InvalidRelayBandwidth> {