pub fn add_target_from_yaml<R>(yaml_reader: R) -> Result<String, RegistryError>where
R: Read,
Expand description
Parse a target description and add the contained targets to the internal target registry.
§Examples
§Add targets from a YAML file
use std::path::Path;
use std::fs::File;
let file = File::open(Path::new("/path/target.yaml"))?;
probe_rs::config::add_target_from_yaml(file)?;
§Add targets from a embedded YAML file
ⓘ
const BUILTIN_TARGET_YAML: &[u8] = include_bytes!("/path/target.yaml");
probe_rs::config::add_target_from_yaml(BUILTIN_TARGET_YAML)?;