MCPcopy Create free account
hub / github.com/csskit/csskit / atom_from_str

Method atom_from_str

crates/css_lexer/src/dyn_atom_registry.rs:87–89  ·  view source on GitHub ↗

Converts a string to a typed atom.

(&self, s: &str)

Source from the content-addressed store, hash-verified

85
86 /// Converts a string to a typed atom.
87 pub fn atom_from_str(&self, s: &str) -> Atom<T> {
88 Atom::new(self.str_to_bits(s))
89 }
90
91 /// Converts raw bits to a typed atom.
92 pub fn atom_from_bits(&self, bits: u32) -> Atom<T> {

Callers 15

test_typed_atomsFunction · 0.80
test_atom_from_bitsFunction · 0.80
test_basicFunction · 0.80
test_implicit_counterFunction · 0.80
test_bytesFunction · 0.80
test_linesFunction · 0.80

Calls 1

str_to_bitsMethod · 0.45

Tested by 15

test_typed_atomsFunction · 0.64
test_atom_from_bitsFunction · 0.64
test_basicFunction · 0.64
test_implicit_counterFunction · 0.64
test_bytesFunction · 0.64
test_linesFunction · 0.64