fn key_pos(&mut self, key: &str) -> usize {
        self.layer
            .get_keys()
            .iter()
            .position(|k| *k == key)
            .unwrap_or_else(|| {
                self.layer.mut_keys().push(key.to_string());
                self.layer.get_keys().len() - 1
            })
    }
/// Get position of a key in the layer keys.  If the key is not found, it
/// is added as the last key.
Get position of a key in the layer keys.  If the key is not found, it
is added as the last key.
Get position of a key in the layer keys . If the key is not found it is added as the last key .
fn key_pos(&mut self, key: &str) -> usize {
        self.layer
            .get_keys()
            .iter()
            .position(|k| *k == key)
            .unwrap_or_else(|| {
                self.layer.mut_keys().push(key.to_string());
                self.layer.get_keys().len() - 1
            })
    }
fn key_pos ( & mut self , key : & str ) -> usize { self . layer . get_keys ( ) . iter ( ) . position ( | k | * k == key ) . unwrap_or_else ( | | { self . layer . mut_keys ( ) . push ( key . to_string ( ) ) ; self . layer . get_keys ( ) . len ( ) - 1 } ) }
Get position of a key in the layer keys.
Get position of a key in the layer keys .
&mut self
key
&str