MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / check_known

Function check_known

atomic-canonical/src/directive.rs:287–294  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

285}
286
287fn check_known(name: &str) -> Result<()> {
288 if !vocab::is_known_directive(name) {
289 return Err(CanonicalError::Directive(format!(
290 "unknown directive ':{name}' — not in the closed registry"
291 )));
292 }
293 Ok(())
294}
295
296/// Split "name{attrs}" (or "name") into (name, attrs-source-without-braces).
297fn split_name_attrs(s: &str) -> (String, &str) {

Callers 2

parseFunction · 0.85
parse_leafFunction · 0.85

Calls 2

is_known_directiveFunction · 0.85
DirectiveClass · 0.85

Tested by

no test coverage detected