asterust_junos/system/services/
xnm_clear_text.rs1use crate::arg_of;
9use asterust::config::ConfigLine;
10
11#[derive(Clone, Debug, PartialEq, Eq)]
13#[non_exhaustive]
14pub struct XnmClearText {
15 pub connection_limit: Option<String>,
16 pub rate_limit: Option<String>,
17}
18
19pub(super) fn parse_xnm_clear_text(xnm: &ConfigLine) -> XnmClearText {
20 XnmClearText {
21 connection_limit: arg_of(xnm, "connection-limit").map(str::to_string),
22 rate_limit: arg_of(xnm, "rate-limit").map(str::to_string),
23 }
24}