MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / fmt

Method fmt

ciphercore-base/src/graphs.rs:174–188  ·  view source on GitHub ↗
(&self, f: &mut fmt::Formatter)

Source from the content-addressed store, hash-verified

172
173impl fmt::Display for Operation {
174 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
175 let operation_name = if let Operation::Custom(custom_op) = self {
176 custom_op.get_name()
177 } else {
178 let operation_w_type_str = format!("{:?}", *self);
179 let split_for_operation = operation_w_type_str.split('(');
180 let vec_operation_and_types: Vec<&str> = split_for_operation.collect();
181 if vec_operation_and_types.is_empty() {
182 "-null-".to_owned()
183 } else {
184 vec_operation_and_types[0].to_owned()
185 }
186 };
187 write!(f, "{operation_name}")
188 }
189}
190
191impl Operation {

Callers

nothing calls this directly

Calls 2

is_emptyMethod · 0.80
get_nameMethod · 0.45

Tested by

no test coverage detected