Skip to main content

parse_symbol

Function parse_symbol 

Source
pub fn parse_symbol(text: &str) -> Symbol
Expand description

Parses namespace/name text into a kernel Symbol.

Splits on the first / into a qualified symbol; text with no / becomes a bare symbol. The kernel owns Symbol; this is the citizen-side spelling of the symbols recorded in registry rows.

ยงExamples

let qualified = parse_symbol("example/Point");
assert_eq!(qualified.to_string(), "example/Point");

let bare = parse_symbol("Point");
assert_eq!(bare.to_string(), "Point");