pub fn open_and_attach_probe(chip_name: &String) -> Result<Session> {
    let probes = Probe::list_all();

    if probes.is_empty() {
        return Err(anyhow!("There are no debug probes connected"));
    } else {
        let probe = probes[0].open()?;
        Ok(probe.attach(chip_name)?)
    }
}
/// Opens the first probe it can find and return its session
Opens the first probe it can find and return its session
Opens the first probe it can find and return its session
pub fn open_and_attach_probe(chip_name: &String) -> Result<Session> {
    let probes = Probe::list_all();
    if probes.is_empty() {
        return Err(anyhow!("There are no debug probes connected"));
    } else {
        let probe = probes[0].open()?;
        Ok(probe.attach(chip_name)?)
    }
}
pub fn open_and_attach_probe ( chip_name : & String ) -> Result < Session > { let probes = Probe :: list_all ( ) ; if probes . is_empty ( ) { return Err ( anyhow ! ( " " ) ) ; } else { let probe = probes [ 0 ] . open ( ) ? ; Ok ( probe . attach ( chip_name ) ? ) } }
Opens the first probe it can find and return its session
Opens the first probe it can find and return its session
chip_name
&String
chip_name
&String