Sets the description for this callable. The `description` is a collection of paragraphs separated by a single newline character, where the first paragraph is taken as the summary of the description. The summary must be a short sentence that is descriptive enough to be understood without further details. Empty lines (paragraphs) are not allowed.
(mut self, description: &'static str)
| 528 | /// of the description. The summary must be a short sentence that is descriptive enough to be |
| 529 | /// understood without further details. Empty lines (paragraphs) are not allowed. |
| 530 | pub fn with_description(mut self, description: &'static str) -> Self { |
| 531 | for l in description.lines() { |
| 532 | assert!(!l.is_empty(), "Description cannot contain empty lines"); |
| 533 | } |
| 534 | self.description = Some(description); |
| 535 | self |
| 536 | } |
| 537 | |
| 538 | /// Generates the final `CallableMetadata` object, ensuring all values are present. |
| 539 | pub fn build(self) -> Rc<CallableMetadata> { |