asterust-junos 0.5.3

Typed Juniper JunOS config views (interfaces, protocols, routing instances and options, policy options, firewall filters, class of service, system, services) extracted from an asterust config tree.
Documentation
//! `rpm`
//! `services { rpm { ... } }`.
//!
//! Only `twamp` is read.
//!
//! # See also
//!
//! - [`[edit services rpm]` hierarchy](https://networkingdocs.hpe.com/documentation/us/en/software/junos/cli-reference/topics/topic-map/hierarchy-edit-services-rpm.html)

pub mod twamp;

pub use twamp::Twamp;

use crate::child_block;
use asterust::config::ConfigLine;
use twamp::parse_twamp;

/// The `services rpm` configuration.
#[derive(Clone, Debug, PartialEq, Eq)]
#[non_exhaustive]
pub struct Rpm {
    pub twamp: Option<Twamp>,
}

pub(super) fn parse_rpm(line: &ConfigLine) -> Rpm {
    Rpm {
        twamp: child_block(line, "twamp").map(parse_twamp),
    }
}