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

Function parse_relationship_inference

src/cosql/inference/relationship.rs:21–35  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

19}
20
21pub fn parse_relationship_inference(input: &str) -> IResult<&str, RelationshipInference> {
22 map(
23 tuple((
24 ws(parse_roles1),
25 ws(tag("forms")),
26 ws(parse_identifier),
27 opt(parse_attributes0),
28 )),
29 |(roles, _, relationship_type, attributes)| RelationshipInference {
30 roles,
31 relationship_type: relationship_type.to_string(),
32 attributes: attributes.unwrap_or_default(),
33 },
34 )(input)
35}
36
37#[cfg(test)]
38mod tests {

Callers 1

Calls 1

wsFunction · 0.50

Tested by 1