You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: by_condition.rs
    path of file: ./repos/tabled/tabled/src/settings/location
    
    the code of the file until where you have to start completion: use crate::{
    grid::config::Entity,
    grid::{
        config::Position,
        records::{ExactRecords, PeekableRecords, Records},
    },
    settings::location::Location,
    settings::object::Object,
};

/// The structure is an implementation of [`Location`] to search for cells with a specified condition.
#[derive(Deb
    
    fn locate(&mut self, records: &R) -> Self::IntoIter {
        // todo: can be optimized by creating Iterator
        let cond = &self.0;

        let mut out = vec![];
        for row in 0..records.count_rows() {
            for col in 0..records.count_columns() {
                let text = records.get_text((row, col));
                if cond(text) {
                    out.push((row, col));
                }
            }
        }

        out
    }