this is my code:

pub fn test(
    c_fivends: &[(u64, u64)],
    c_exons: &[(u64, u64)],
    c_introns: &[(u64, u64)],
    tx_exons: &[&(u64, u64)],
    id: &Arc<str>,
    // flags -> (skip_exon [0: true, 1: false], nt_5_end)
    flags: &HashSet<(u64, u64)>,
    line: String,
) {
    let tx_5end = tx_exons[0];
    let (skip, _) = flags.iter().next().unwrap();

    let status = match c_fivends.interval_search(&tx_5end) {
        // is inside
        Some((s, e)) => {
            // starts differ
            if s != tx_5end.0 {
                match skip {
                    1 => FivePrimeStatus::TruncatedInExon,
                    _ => FivePrimeStatus::Complete,
                }
            } else {
                // starts are equal
                FivePrimeStatus::Complete
            }
        }
        // is not inside -> check c_exons overlap
        None => match c_exons.interval_search(&tx_5end) {
            Some((ex_s, ex_e)) => {
                if ex_s != tx_5end.0 {
                    match skip {
                        1 => FivePrimeStatus::TruncatedInExon,
                        _ => FivePrimeStatus::Complete,
                    }
                } else {
                    // starts are equal
                    FivePrimeStatus::Complete
                }
            }
            None => FivePrimeStatus::Complete,
        },
    };
}

pub trait IntervalSearch<T> {
    fn interval_search(&self, query: &(T, T)) -> Option<(T, T)>
    where
        T: PartialOrd + Copy;
}

impl<T> IntervalSearch<T> for Vec<(T, T)> {
    fn interval_search(&self, query: &(T, T)) -> Option<(T, T)>
    where
        T: PartialOrd + Copy,
    {
        let mut start = 0;
        let mut end = self.len();

        while start < end {
            let mid = start + (end - start) / 2;
            let mid_val = self[mid];

            if query.1 <= mid_val.0 {
                end = mid;
            } else if query.0 >= mid_val.1 {
                start = mid + 1;
            } else {
                return Some(mid_val);
            }
        }

        None
    }
}

I got this error:

error[E0599]: no method named `interval_search` found for reference `&[(u64,
 u64)]` in the current scope
   --> src/bif/fivend.rs:186:34
    |
186 |     let status = match c_fivends.interval_search(&tx_5end) {
    |                                  ^^^^^^^^^^^^^^^ help: there is a meth
od with a similar name: `binary_search`
    |
    = help: items from traits can only be used if the trait is implemented a
nd in scope
note: `IntervalSearch` defines an item `interval_search`, perhaps you need t
o implement it
   --> src/bif/fivend.rs:218:1
    |
218 | pub trait IntervalSearch<T> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no method named `interval_search` found for reference `&[(u64,
 u64)]` in the current scope
   --> src/bif/fivend.rs:201:31
    |
201 |         None => match c_exons.interval_search(&tx_5end) {
    |                               ^^^^^^^^^^^^^^^ help: there is a method 
with a similar name: `binary_search`
    |
    = help: items from traits can only be used if the trait is implemented a
nd in scope
note: `IntervalSearch` defines an item `interval_search`, perhaps you need t
o implement it
   --> src/bif/fivend.rs:218:1
    |
218 | pub trait IntervalSearch<T> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^