Applies [Context::set_node_name] to the parent context and `this` node. Returns the clone of `this`. # Example ``` # use ciphercore_base::graphs::create_context; # use ciphercore_base::data_types::{scalar_type, BIT}; let c = create_context().unwrap(); let g = c.create_graph().unwrap(); let t = scalar_type(BIT); let n = g.input(t).unwrap(); n.set_name("XOR").unwrap(); ```
(&self, name: &str)
| 528 | /// n.set_name("XOR").unwrap(); |
| 529 | /// ``` |
| 530 | pub fn set_name(&self, name: &str) -> Result<Node> { |
| 531 | self.get_graph() |
| 532 | .get_context() |
| 533 | .set_node_name(self.clone(), name)?; |
| 534 | Ok(self.clone()) |
| 535 | } |
| 536 | |
| 537 | /// Applies [Context::get_node_name] to the parent context and `this` node. |
| 538 | /// |