MCPcopy Index your code
hub / github.com/ciphermodelabs/ciphercore / get_name

Method get_name

ciphercore-base/src/graphs.rs:551–553  ·  view source on GitHub ↗

Applies [Context::get_node_name] to the parent context and `this` node. # 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(); assert_eq!(n.get_name().unwrap(), Some("XOR".to_owned()))

(&self)

Source from the content-addressed store, hash-verified

549 /// assert_eq!(n.get_name().unwrap(), Some("XOR".to_owned()));
550 /// ```
551 pub fn get_name(&self) -> Result<Option<String>> {
552 self.get_graph().get_context().get_node_name(self.clone())
553 }
554
555 /// Adds a node to the parent graph that adds elementwise the array or scalar associated with the node to an array or scalar of the same scalar type associated with another node.
556 ///

Callers 2

fmtMethod · 0.45
copy_node_nameFunction · 0.45

Calls 5

cloneMethod · 0.80
get_node_nameMethod · 0.45
get_contextMethod · 0.45
get_graphMethod · 0.45
get_graph_nameMethod · 0.45

Tested by

no test coverage detected