fn add_element(&mut self, mut elem: ServiceTableElement) {
        let key = get_service_table_key(&elem.service);
        if !self.map.contains_key(&key) {
            elem.service_id = (self.services.len() + 1) as u16;
            self.map.insert(key, self.services.len());
            self.services.push(elem);
        }
    }
/// Add a given element into the table and assign it its service ID.
Add a given element into the table and assign it its service ID.
Add a given element into the table and assign it its service ID .
fn add_element(&mut self, mut elem: ServiceTableElement) {
        let key = get_service_table_key(&elem.service);
        if !self.map.contains_key(&key) {
            elem.service_id = (self.services.len() + 1) as u16;
            self.map.insert(key, self.services.len());
            self.services.push(elem);
        }
    }
fn add_element ( & mut self , mut elem : ServiceTableElement ) { let key = get_service_table_key ( & elem . service ) ; if ! self . map . contains_key ( & key ) { elem . service_id = ( self . services . len ( ) + 1 ) as u16 ; self . map . insert ( key , self . services . len ( ) ) ; self . services . push ( elem ) ; } }
Add a given element into the table and assign it its service ID.
Add a given element into the table and assign it its service ID .
&mut self
elem
ServiceTableElement
&mut self
elem
ServiceTableElement