(
nodes: TemplateConfig,
edges: TemplateConfig,
)
| 77 | } |
| 78 | |
| 79 | fn template_from_python( |
| 80 | nodes: TemplateConfig, |
| 81 | edges: TemplateConfig, |
| 82 | ) -> PyResult<DocumentTemplate> { |
| 83 | if nodes.is_disabled() && edges.is_disabled() { |
| 84 | Err(PyAttributeError::new_err( |
| 85 | "at least one of nodes and edges has to be set to True or some string", |
| 86 | )) |
| 87 | } else { |
| 88 | Ok(DocumentTemplate { |
| 89 | node_template: nodes.get_template_or(DEFAULT_NODE_TEMPLATE), |
| 90 | edge_template: edges.get_template_or(DEFAULT_EDGE_TEMPLATE), |
| 91 | }) |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | #[pymethods] |
| 96 | impl PyGraphServer { |
no test coverage detected