pub fn safe_add_socket(
        &mut self,
        socket_id: u16,
        domains: Vec<Domain>,
        attributes: Vec<Vec<HashMap<String, String>>>,
        counter_uj_path: String,
        buffer_max_kbytes: u16,
    ) {
        if !self.sockets.iter().any(|s| s.id == socket_id) {
            let socket = CPUSocket::new(
                socket_id,
                domains,
                attributes,
                counter_uj_path,
                buffer_max_kbytes,
            );
            self.sockets.push(socket);
        }
    }
/// Adds a Socket instance to self.sockets if and only if the
/// socket id doesn't exist already.
Adds a Socket instance to self.sockets if and only if the
socket id doesn't exist already.
Adds a Socket instance to self . sockets if and only if the socket id doesn ' t exist already .
pub fn safe_add_socket(
        &mut self,
        socket_id: u16,
        domains: Vec<Domain>,
        attributes: Vec<Vec<HashMap<String, String>>>,
        counter_uj_path: String,
        buffer_max_kbytes: u16,
    ) {
        if !self.sockets.iter().any(|s| s.id == socket_id) {
            let socket = CPUSocket::new(
                socket_id,
                domains,
                attributes,
                counter_uj_path,
                buffer_max_kbytes,
            );
            self.sockets.push(socket);
        }
    }
pub fn safe_add_socket ( & mut self , socket_id : u16 , domains : Vec < Domain > , attributes : Vec < Vec < HashMap < String , String > > > , counter_uj_path : String , buffer_max_kbytes : u16 , ) { if ! self . sockets . iter ( ) . any ( | s | s . id == socket_id ) { let socket = CPUSocket :: new ( socket_id , domains , attributes , counter_uj_path , buffer_max_kbytes , ) ; self . sockets . push ( socket ) ; } }
Adds a Socket instance to self.sockets if and only if the
socket id doesn't exist already.
Adds a Socket instance to self . sockets if and only if the socket id doesn ' t exist already .
&mut self
socket_id
u16
domains
Vec<Domain>
attributes
Vec<Vec<HashMap<String, String>>>
counter_uj_path
String
buffer_max_kbytes
u16
&mut self
socket_id
u16
domains
Vec<Domain>
attributes
Vec<Vec<HashMap<String, String>>>
counter_uj_path
String
buffer_max_kbytes
u16