MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / read_single_route

Function read_single_route

aiscript-runtime/src/lib.rs:55–65  ·  view source on GitHub ↗
(file_path: &Path)

Source from the content-addressed store, hash-verified

53}
54
55fn read_single_route(file_path: &Path) -> Option<ast::Route> {
56 match fs::read_to_string(file_path) {
57 Ok(input) => match parser::parse_route(&input) {
58 Ok(route) => return Some(route),
59 Err(e) => eprintln!("Error parsing route file {:?}: {}", file_path, e),
60 },
61 Err(e) => eprintln!("Error reading route file {:?}: {}", file_path, e),
62 }
63
64 None
65}
66
67pub async fn run(path: Option<PathBuf>, port: u16, reload: bool) {
68 if !reload {

Callers 2

read_routesFunction · 0.85
run_serverFunction · 0.85

Calls 1

parse_routeFunction · 0.85

Tested by

no test coverage detected