1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//! zabbix sender //! use super::protocol::ZabbixProtocol; /// #[derive(Debug, Clone)] pub struct ZabbixSender { name: String, proto: ZabbixProtocol, } impl ZabbixSender { pub fn new(name: &str, server: &str, port: u16) -> Self { let name = String::from(name); let proto = ZabbixProtocol::new(server, port); Self { name, proto } } }