pub fn push(
        &mut self,
        name: Option<PointName>,
        label: Metadata,
    ) -> Result<(), PointCloudError> {
        if let Some(n) = name {
            self.names.insert(self.count, n.clone());
        }
        for (k, list) in self.lists.iter_mut() {
            match label.get(k) {
                Some(val) => list.push(val.clone()),
                None => {
                    return Err(PointCloudError::data_access(
                        0,
                        "label access error, no key".to_string(),
                    ));
                }
            };
        }
        self.count += 1;
        Ok(())
    }
/// Appends a the values contained in a metadata list to our metadata.
/// Errors out if you are missing a key that the map has. 
Appends a the values contained in a metadata list to our metadata.
Errors out if you are missing a key that the map has.
Appends a the values contained in a metadata list to our metadata . Errors out if you are missing a key that the map has .
pub fn push(
        &mut self,
        name: Option<PointName>,
        label: Metadata,
    ) -> Result<(), PointCloudError> {
        if let Some(n) = name {
            self.names.insert(self.count, n.clone());
        }
        for (k, list) in self.lists.iter_mut() {
            match label.get(k) {
                Some(val) => list.push(val.clone()),
                None => {
                    return Err(PointCloudError::data_access(
                        0,
                        "label access error, no key".to_string(),
                    ));
                }
            };
        }
        self.count += 1;
        Ok(())
    }
pub fn push ( & mut self , name : Option < PointName > , label : Metadata , ) -> Result < ( ) , PointCloudError > { if let Some ( n ) = name { self . names . insert ( self . count , n . clone ( ) ) ; } for ( k , list ) in self . lists . iter_mut ( ) { match label . get ( k ) { Some ( val ) => list . push ( val . clone ( ) ) , None => { return Err ( PointCloudError :: data_access ( 0 , " " . to_string ( ) , ) ) ; } } ; } self . count += 1 ; Ok ( ( ) ) }
Appends a the values contained in a metadata list to our metadata.
Appends a the values contained in a metadata list to our metadata .
&mut self
name
Option<PointName>
label
Metadata
&mut self
name
Option<PointName>
label
Metadata