use std::net::ToSocketAddrs;
use anyhow::Result;
pub trait NetworkDevice {
fn connect<A: ToSocketAddrs>(
addr: A,
username: Option<&str>,
password: Option<&str>,
) -> Result<Self>
where
Self: Sized;
fn execute(&mut self, command: &str) -> Result<String>;
fn version(&mut self) -> Result<String>;
fn logbuffer(&mut self) -> Result<String>;
fn ping(&mut self, ip: &str) -> Result<String>;
}