MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_build

Method test_build

core/src/callable.rs:553–565  ·  view source on GitHub ↗

Generates the final `CallableMetadata` object, ensuring the minimal set of values are present. Only useful for testing.

(mut self)

Source from the content-addressed store, hash-verified

551 /// Generates the final `CallableMetadata` object, ensuring the minimal set of values are
552 /// present. Only useful for testing.
553 pub fn test_build(mut self) -> Rc<CallableMetadata> {
554 if self.syntaxes.is_empty() {
555 self.syntaxes.push(CallableSyntax::new_static(&[], None));
556 }
557 Rc::from(CallableMetadata {
558 name: self.name,
559 return_type: self.return_type,
560 is_async: self.is_async,
561 syntaxes: self.syntaxes,
562 category: self.category.unwrap_or(""),
563 description: self.description.unwrap_or(""),
564 })
565 }
566}
567
568/// Representation of a callable's metadata.

Calls 2

pushMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected