MCPcopy Create free account
hub / github.com/cosdata/cosdata / parse_attribute

Function parse_attribute

src/cosql/insertion/mod.rs:44–52  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

42}
43
44pub fn parse_attribute(input: &str) -> IResult<&str, Attribute> {
45 map(
46 tuple((ws(parse_identifier), ws(char(':')), ws(parse_value))),
47 |(name, _, value)| Attribute {
48 name: name.to_string(),
49 value,
50 },
51 )(input)
52}
53
54#[cfg(test)]
55mod tests {

Callers 1

test_attribute_parserFunction · 0.85

Calls 1

wsFunction · 0.50

Tested by 1

test_attribute_parserFunction · 0.68