(
&self,
timestamp: EventTime,
id: GID,
properties: Option<HashMap<String, Prop>>,
node_type: Option<&str>,
layer: Option<&str>,
)
| 225 | /// RemoteNode: the new remote node |
| 226 | #[pyo3(signature = (timestamp, id, properties = None, node_type = None, layer = None))] |
| 227 | pub fn add_node( |
| 228 | &self, |
| 229 | timestamp: EventTime, |
| 230 | id: GID, |
| 231 | properties: Option<HashMap<String, Prop>>, |
| 232 | node_type: Option<&str>, |
| 233 | layer: Option<&str>, |
| 234 | ) -> Result<PyRemoteNode, ClientError> { |
| 235 | let graph = Arc::clone(&self.graph); |
| 236 | let node_type = node_type.map(|s| s.to_string()); |
| 237 | let layer = layer.map(|s| s.to_string()); |
| 238 | |
| 239 | let node = execute_async_task(move || async move { |
| 240 | graph |
| 241 | .add_node(timestamp, id, properties, node_type, layer) |
| 242 | .await |
| 243 | })?; |
| 244 | |
| 245 | Ok(PyRemoteNode::new(node)) |
| 246 | } |
| 247 | |
| 248 | /// Create a new node with the given id and properties to the remote graph and fail if the node already exists. |
| 249 | /// |
nothing calls this directly
no test coverage detected