pub struct JunosDevice { /* private fields */ }Expand description
Holds a parsed Junos show configuration (brace format) and exposes each supported view.
§Examples
use asterust_junos::JunosDevice;
let device = JunosDevice::parse("system {\n host-name pe1;\n}\n");
assert_eq!(device.system().unwrap().host_name.as_deref(), Some("pe1"));
assert!(device.bgp().is_none());Implementations§
Source§impl JunosDevice
impl JunosDevice
Sourcepub fn from_config(config: Config) -> Self
pub fn from_config(config: Config) -> Self
Wraps an already-parsed Config.
pub fn interfaces(&self) -> Vec<Interface>
pub fn ospf(&self) -> Option<Ospf>
pub fn bgp(&self) -> Option<Bgp>
pub fn isis(&self) -> Option<Isis>
pub fn routing_instances(&self) -> Vec<RoutingInstance>
pub fn routing_options(&self) -> Option<RoutingOptions>
pub fn policy_options(&self) -> Option<PolicyOptions>
pub fn firewall(&self) -> Option<Firewall>
pub fn system(&self) -> Option<System>
Trait Implementations§
Source§impl Clone for JunosDevice
impl Clone for JunosDevice
Source§impl Debug for JunosDevice
impl Debug for JunosDevice
Auto Trait Implementations§
impl Forget for JunosDevice
impl Freeze for JunosDevice
impl Move for JunosDevice
impl RefUnwindSafe for JunosDevice
impl Send for JunosDevice
impl Sync for JunosDevice
impl Unpin for JunosDevice
impl UnsafeUnpin for JunosDevice
impl UnwindSafe for JunosDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more